зеркало из https://github.com/mozilla/gecko-dev.git
Bug 966311 - Calculate frame size for stereo wave. r=doublec
We were assuming 8-bit WAVE files were mono-only, but this is not necessarily the case.
This commit is contained in:
Родитель
dc0ed322d5
Коммит
2cf002736e
|
@ -424,7 +424,7 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
|
|||
// but the channels check is intentionally limited to mono or stereo
|
||||
// when the media is intended for direct playback because that's what the
|
||||
// audio backend currently supports.
|
||||
unsigned int actualFrameSize = sampleFormat == 8 ? 1 : 2 * channels;
|
||||
unsigned int actualFrameSize = (sampleFormat == 8 ? 1 : 2) * channels;
|
||||
if (rate < 100 || rate > 96000 ||
|
||||
(((channels < 1 || channels > MAX_CHANNELS) ||
|
||||
(frameSize != 1 && frameSize != 2 && frameSize != 4)) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче