mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
05a67520f6
commit
75b75bea7a
@ -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)) &&
|
||||
|
Loading…
Reference in New Issue
Block a user