mirror of https://github.com/mpv-player/mpv
ao_oss: fix compilation on BSD
This was overlooked with commit 32a898f
, because OSS4 volume control is
typically not available on Linux. BSD does have this feature, so the
broken code broke compilation there.
This commit is contained in:
parent
ff832dd149
commit
d2d9ba326a
|
@ -119,8 +119,9 @@ static int oss2format(int format)
|
|||
|
||||
|
||||
#ifdef SNDCTL_DSP_GETPLAYVOL
|
||||
static int volume_oss4(ao_control_vol_t *vol, int cmd)
|
||||
static int volume_oss4(struct ao *ao, ao_control_vol_t *vol, int cmd)
|
||||
{
|
||||
struct priv *p = ao->priv;
|
||||
int v;
|
||||
|
||||
if (p->audio_fd < 0)
|
||||
|
@ -155,7 +156,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
|
|||
|
||||
#ifdef SNDCTL_DSP_GETPLAYVOL
|
||||
// Try OSS4 first
|
||||
if (volume_oss4(vol, cmd) == CONTROL_OK)
|
||||
if (volume_oss4(ao, vol, cmd) == CONTROL_OK)
|
||||
return CONTROL_OK;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue