summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_oss.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-06 02:30:57 +0200
committerwm4 <wm4@nowhere>2014-09-06 02:30:57 +0200
commit439a05d8c3c31ff4751a03dba69dfb96321a83e2 (patch)
tree270d1fa8ce2db5c3fb67771268382ef5523de38e /audio/out/ao_oss.c
parent197f18402ed1e38e8e151a912e416e0b86d277d2 (diff)
downloadmpv-439a05d8c3c31ff4751a03dba69dfb96321a83e2.tar.bz2
mpv-439a05d8c3c31ff4751a03dba69dfb96321a83e2.tar.xz
audio/out: remove old things
Remove the unnecessary indirection through ao fields. Also fix the inverted result of AOCONTROL_HAS_TEMP_VOLUME. Hopefully the change is equivalent. But actually, it looks like the old code did it wrong.
Diffstat (limited to 'audio/out/ao_oss.c')
-rw-r--r--audio/out/ao_oss.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 1d88291532..f84c7fffd1 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -178,8 +178,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
struct priv *p = ao->priv;
switch (cmd) {
case AOCONTROL_GET_VOLUME:
- case AOCONTROL_SET_VOLUME:
- {
+ case AOCONTROL_SET_VOLUME: {
ao_control_vol_t *vol = (ao_control_vol_t *)arg;
int fd, v, devs;
@@ -210,9 +209,13 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
close(fd);
return CONTROL_OK;
}
- }
return CONTROL_ERROR;
}
+#ifdef SNDCTL_DSP_GETPLAYVOL
+ case AOCONTROL_HAS_SOFT_VOLUME:
+ return CONTROL_TRUE;
+#endif
+ }
return CONTROL_UNKNOWN;
}
@@ -223,10 +226,6 @@ static int init(struct ao *ao)
struct priv *p = ao->priv;
int oss_format;
-#ifdef SNDCTL_DSP_GETPLAYVOL
- ao->no_persistent_volume = true;
-#endif
-
const char *mchan = NULL;
if (p->cfg_oss_mixer_channel && p->cfg_oss_mixer_channel[0])
mchan = p->cfg_oss_mixer_channel;