/* This atom's content is a WAVE header, including 2 bytes of extra data.
Note that all of this is little-endian, unlike most stuff in qt. */
+ /* 4 bytes header per channel (including 1 sample). Then 2 samples per byte
+ for the rest. Simplifies to this. */
samplesperblock = 2 * blocksize / channels - 7;
bytespersec = rate * blocksize / samplesperblock;
GST_WRITE_UINT16_LE (data, 0x11);
GST_DEBUG_OBJECT (qtmux, "broken caps, block_align missing");
goto refuse_caps;
}
- // Currently only supports WAV-style IMA ADPCM, for which the codec id is
- // 0x11
+ /* Currently only supports WAV-style IMA ADPCM, for which the codec id is
+ 0x11 */
entry.fourcc = MS_WAVE_FOURCC (0x11);
+ /* 4 byte header per channel (including one sample). 2 samples per byte
+ remaining. Simplifying gives the following (samples per block per
+ channel) */
entry.samples_per_packet = 2 * blocksize / channels - 7;
entry.bytes_per_sample = 2;