mirror of
https://github.com/mpv-player/mpv
synced 2025-01-17 12:31:25 +00:00
disable all unknown formats in the windows aos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14136 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6404bc9c46
commit
ecb5105a2c
@ -364,6 +364,17 @@ static int init(int rate, int channels, int format, int flags)
|
||||
DSBUFFERDESC dsbpridesc;
|
||||
DSBUFFERDESC dsbdesc;
|
||||
|
||||
//check if the format is supported in general
|
||||
switch(format){
|
||||
case AFMT_AC3:
|
||||
case AFMT_S24_LE:
|
||||
case AFMT_S16_LE:
|
||||
case AFMT_S8:
|
||||
break;
|
||||
default:
|
||||
mp_msg(MSGT_AO, MSGL_V,"ao_dsound: format %s not supported defaulting to Signed 16-bit Little-Endian\n",audio_out_format_name(format));
|
||||
format=AFMT_S16_LE;
|
||||
}
|
||||
//fill global ao_data
|
||||
ao_data.channels = channels;
|
||||
ao_data.samplerate = rate;
|
||||
|
@ -148,6 +148,16 @@ static int init(int rate,int channels,int format,int flags)
|
||||
unsigned char* buffer;
|
||||
int i;
|
||||
|
||||
switch(format){
|
||||
case AFMT_AC3:
|
||||
case AFMT_S24_LE:
|
||||
case AFMT_S16_LE:
|
||||
case AFMT_S8:
|
||||
break;
|
||||
default:
|
||||
mp_msg(MSGT_AO, MSGL_V,"ao_win32: format %s not supported defaulting to Signed 16-bit Little-Endian\n",audio_out_format_name(format));
|
||||
format=AFMT_S16_LE;
|
||||
}
|
||||
//fill global ao_data
|
||||
ao_data.channels=channels;
|
||||
ao_data.samplerate=rate;
|
||||
|
Loading…
Reference in New Issue
Block a user