mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
QUERY_FORMAT support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15899 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3c93e7b558
commit
a1af27beb4
@ -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:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user