Commit a522385e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Add support for the 48 and 96kHz formats.

parent d1b77764
......@@ -103,12 +103,14 @@ static struct {
{1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025},
{1, 8, 22050}, {2, 8, 22050}, {1, 16, 22050}, {2, 16, 22050},
{1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100},
{1, 8, 48000}, {2, 8, 48000}, {1, 16, 48000}, {2, 16, 48000},
{1, 8, 96000}, {2, 8, 96000}, {1, 16, 96000}, {2, 16, 96000}
};
/***********************************************************************
* PCM_GetFormatIndex
*/
static DWORD PCM_GetFormatIndex(LPWAVEFORMATEX wfx)
static DWORD PCM_GetFormatIndex(LPWAVEFORMATEX wfx)
{
int i;
......
......@@ -191,24 +191,32 @@ static DWORD wodOpen(LPDWORD lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
for (i = ndlo; i < ndhi; i++) {
/* first try with same stereo/mono option as source */
wfx.nChannels = lpDesc->lpFormat->nChannels;
TRY(96000, 16);
TRY(48000, 16);
TRY(44100, 16);
TRY(22050, 16);
TRY(11025, 16);
/* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */
wfx.nChannels ^= 3;
TRY(96000, 16);
TRY(48000, 16);
TRY(44100, 16);
TRY(22050, 16);
TRY(11025, 16);
/* first try with same stereo/mono option as source */
wfx.nChannels = lpDesc->lpFormat->nChannels;
TRY(96000, 8);
TRY(48000, 8);
TRY(44100, 8);
TRY(22050, 8);
TRY(11025, 8);
/* 2^3 => 1, 1^3 => 2, so if stereo, try mono (and the other way around) */
wfx.nChannels ^= 3;
TRY(96000, 8);
TRY(48000, 8);
TRY(44100, 8);
TRY(22050, 8);
TRY(11025, 8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment