mirror of https://github.com/mpv-player/mpv
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:
|
case AOCONTROL_GET_DEVICE:
|
||||||
*(char**)arg=dsp;
|
*(char**)arg=dsp;
|
||||||
return CONTROL_OK;
|
return CONTROL_OK;
|
||||||
|
#ifdef SNDCTL_DSP_GETFMTS
|
||||||
case AOCONTROL_QUERY_FORMAT:
|
case AOCONTROL_QUERY_FORMAT:
|
||||||
|
{
|
||||||
|
int format;
|
||||||
|
if (!ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &format))
|
||||||
|
if (format & (int)arg)
|
||||||
return CONTROL_TRUE;
|
return CONTROL_TRUE;
|
||||||
|
return CONTROL_FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
case AOCONTROL_GET_VOLUME:
|
case AOCONTROL_GET_VOLUME:
|
||||||
case AOCONTROL_SET_VOLUME:
|
case AOCONTROL_SET_VOLUME:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue