mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
Don't consider a bad format an error unless the capabilities say it
should be supported. Don't consider a device already in use an error.
This commit is contained in:
parent
eb883577e4
commit
b50347d452
@ -435,7 +435,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
|
||||
if (winetest_interactive)
|
||||
trace(" Testing the capture buffer at %s\n", format_string(&wfx));
|
||||
rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
|
||||
ok((rc==DS_OK)&&(dscbo!=NULL),
|
||||
ok(((rc==DS_OK)&&(dscbo!=NULL))||(rc==DSERR_BADFORMAT)||(rc==DSERR_ALLOCATED),
|
||||
"IDirectSoundCapture_CreateCaptureBuffer() failed to create a "
|
||||
"capture buffer: %s\n",DXGetErrorString8(rc));
|
||||
if (rc==DS_OK) {
|
||||
@ -443,7 +443,14 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
|
||||
ref=IDirectSoundCaptureBuffer_Release(dscbo);
|
||||
ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, "
|
||||
"should have 0\n",ref);
|
||||
}
|
||||
} else if (rc==DSERR_BADFORMAT) {
|
||||
ok(!(dsccaps.dwFormats & formats[f][3]),
|
||||
"IDirectSoundCapture_CreateCaptureBuffer() failed to create a "
|
||||
"capture buffer: format listed as supported but using it failed\n");
|
||||
if (!(dsccaps.dwFormats & formats[f][3]))
|
||||
trace(" Format not supported: %s\n", format_string(&wfx));
|
||||
} else if (rc==DSERR_ALLOCATED)
|
||||
trace(" Already In Use\n");
|
||||
}
|
||||
|
||||
/* try a non PCM format */
|
||||
|
@ -18,31 +18,31 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
static const unsigned int formats[][3]={
|
||||
{ 8000, 8, 1},
|
||||
{ 8000, 8, 2},
|
||||
{ 8000, 16, 1},
|
||||
{ 8000, 16, 2},
|
||||
{11025, 8, 1},
|
||||
{11025, 8, 2},
|
||||
{11025, 16, 1},
|
||||
{11025, 16, 2},
|
||||
{22050, 8, 1},
|
||||
{22050, 8, 2},
|
||||
{22050, 16, 1},
|
||||
{22050, 16, 2},
|
||||
{44100, 8, 1},
|
||||
{44100, 8, 2},
|
||||
{44100, 16, 1},
|
||||
{44100, 16, 2},
|
||||
{48000, 8, 1},
|
||||
{48000, 8, 2},
|
||||
{48000, 16, 1},
|
||||
{48000, 16, 2},
|
||||
{96000, 8, 1},
|
||||
{96000, 8, 2},
|
||||
{96000, 16, 1},
|
||||
{96000, 16, 2}
|
||||
static const unsigned int formats[][4]={
|
||||
{ 8000, 8, 1, 0 },
|
||||
{ 8000, 8, 2, 0 },
|
||||
{ 8000, 16, 1, 0 },
|
||||
{ 8000, 16, 2, 0 },
|
||||
{11025, 8, 1, WAVE_FORMAT_1M08 },
|
||||
{11025, 8, 2, WAVE_FORMAT_1S08 },
|
||||
{11025, 16, 1, WAVE_FORMAT_1M16 },
|
||||
{11025, 16, 2, WAVE_FORMAT_1S16 },
|
||||
{22050, 8, 1, WAVE_FORMAT_2M08 },
|
||||
{22050, 8, 2, WAVE_FORMAT_2S08 },
|
||||
{22050, 16, 1, WAVE_FORMAT_2M16 },
|
||||
{22050, 16, 2, WAVE_FORMAT_2S16 },
|
||||
{44100, 8, 1, WAVE_FORMAT_4M08 },
|
||||
{44100, 8, 2, WAVE_FORMAT_4S08 },
|
||||
{44100, 16, 1, WAVE_FORMAT_4M16 },
|
||||
{44100, 16, 2, WAVE_FORMAT_4S16 },
|
||||
{48000, 8, 1, WAVE_FORMAT_48M08 },
|
||||
{48000, 8, 2, WAVE_FORMAT_48S08 },
|
||||
{48000, 16, 1, WAVE_FORMAT_48M16 },
|
||||
{48000, 16, 2, WAVE_FORMAT_48S16 },
|
||||
{96000, 8, 1, WAVE_FORMAT_96M08 },
|
||||
{96000, 8, 2, WAVE_FORMAT_96S08 },
|
||||
{96000, 16, 1, WAVE_FORMAT_96M16 },
|
||||
{96000, 16, 2, WAVE_FORMAT_96S16 }
|
||||
};
|
||||
#define NB_FORMATS (sizeof(formats)/sizeof(*formats))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user