)]}'
{
  "commit": "4d45e30d9fe8b456b326d4f65a80154f41fe07f0",
  "tree": "f1a0ef6557e6c2c764887efc116111b19cc9ce65",
  "parents": [
    "faf9d268d58a00353d5831bc453c705b1111a962"
  ],
  "author": {
    "name": "Martin Puryear",
    "email": "mpuryear@fuchsia.infra.roller.google.com",
    "time": "Tue May 04 06:43:23 2021 +0000"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon May 03 23:44:26 2021 -0700"
  },
  "message": "[roll] Roll fuchsia [media][tools] Fix \"wav_recorder --duration\"\n\nPreviously, when the \u0027--duration\u0027 flag was used with wav_recorder,\nit always finished early. Now, when provided a specific duration\nto record, we pre-calculate the number of frames and stop once we\nreach/exceed that amount (trimming the amount back if we exceed),\nso that we record the precise number of frames requested.\n\nIn addition to the bug referenced below, this was requested by\nFCT folks.\n\nThe following .wav file sizes demonstrate our new precision\n(keeping in mind that the RIFF WAV header itself is 44 bytes).\n\n-- Very short:\n\n$ wav_recorder --duration\u003d.001 --chans\u003d1 --int16 --rate\u003d1000 \\\n               /tmp/tiny.wav\n\nWe will record for 0.001 seconds.\nRecording 16-bit signed int, 1000 Hz, 1-channel linear PCM\nfrom default input into \u0027/tmp/tiny.wav\u0027 for 1 frames (1.000000 msec)\nusing the default reference clock\nusing 10 packets of 100 frames (100.000 msec) in a 1.000-sec payload buffer\n\nShutting down...\nWe recorded 1 frames.\n$ ls -l /tmp/tiny.wav\n-rw-------    1 0        0                46 May 04 04:24 /tmp/tiny.wav\n\n-- And very long (with precise frame rate for a nice round size):\n\n$ wav_recorder --loopback --duration\u003d10 --chans\u003d4 \\\n               --sync --rate\u003d187500 /tmp/big_ten.wav\n\nWe will record for 10.000 seconds.\nRecording 32-bit float, 187500 Hz, 4-channel linear PCM\nfrom loopback into \u0027/tmp/big_ten.wav\u0027 for 1875000 frames (10000.000000 msec)\nusing the default reference clock\nusing 10 packets of 18750 frames (100.000 msec) in a 1.000-sec payload buffer\n\nShutting down...\nWe recorded 1875000 frames.\n$ ls -l /tmp/big_ten.wav\n-rw-------    1 0        0          30000044 May 04 04:31 /tmp/big_ten.wav\n\nOriginal-Fixed: b/148807692\n\nOriginal-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/524227\nOriginal-Revision: e438ae1f5308b7510f2d0a7131e5a60a1f212ef9\nGitOrigin-RevId: 547ffdf2120284a2905bf2f753ab6931d5a7aee1\nChange-Id: Ifa1c48f0cb6c0e6601def8a8103107ba8266c04b\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ca079f8a6e619ffdd52b9cc6e74e815fbc3d4b48",
      "old_mode": 33188,
      "old_path": "stem",
      "new_id": "982d910cd734a1d67c28f0d2e141ea803dbce9b7",
      "new_mode": 33188,
      "new_path": "stem"
    }
  ]
}
