mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 842176 - Partial revert of bug 839319; use WAVE_FORMATEX when channels <= 2. r=doublec
This commit is contained in:
parent
256a511da6
commit
488cbf6168
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
||||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was e945dbd052793a7faba3e9064d03bd6781b02692.
|
||||
The git commit ID used was 49f2565ff54192821b9b717988399a875d3b1c61.
|
||||
|
@ -331,8 +331,16 @@ cubeb_stream_init(cubeb * context, cubeb_stream ** stream, char const * stream_n
|
||||
}
|
||||
|
||||
memset(&wfx, 0, sizeof(wfx));
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
wfx.Format.cbSize = sizeof(wfx) - sizeof(wfx.Format);
|
||||
if (stream_params.channels > 2) {
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
wfx.Format.cbSize = sizeof(wfx) - sizeof(wfx.Format);
|
||||
} else {
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
if (stream_params.format == CUBEB_SAMPLE_FLOAT32LE) {
|
||||
wfx.Format.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
|
||||
}
|
||||
wfx.Format.cbSize = 0;
|
||||
}
|
||||
wfx.Format.nChannels = stream_params.channels;
|
||||
wfx.Format.nSamplesPerSec = stream_params.rate;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user