From d2d9ba326ae722f0e8ba9d63ee94da2460503b57 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 11 Jun 2013 12:21:57 +0200 Subject: 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. --- audio/out/ao_oss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 8c8bc4018e..d5125ffcd7 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -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 -- cgit v1.2.3