QUERY_FORMAT support

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15899 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2005-07-03 11:38:35 +00:00
parent 3c93e7b558
commit a1af27beb4
1 changed files with 9 additions and 1 deletions

View File

@ -160,8 +160,16 @@ static int control(int cmd,void *arg){
case AOCONTROL_GET_DEVICE:
*(char**)arg=dsp;
return CONTROL_OK;
#ifdef SNDCTL_DSP_GETFMTS
case AOCONTROL_QUERY_FORMAT:
return CONTROL_TRUE;
{
int format;
if (!ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &format))
if (format & (int)arg)
return CONTROL_TRUE;
return CONTROL_FALSE;
}
#endif
case AOCONTROL_GET_VOLUME:
case AOCONTROL_SET_VOLUME:
{