summaryrefslogtreecommitdiffstats
path: root/audio/out/ao.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.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.c')
-rw-r--r--audio/out/ao.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index 56d9232189..00bda6d283 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -259,16 +259,7 @@ int ao_play(struct ao *ao, void **data, int samples, int flags)
int ao_control(struct ao *ao, enum aocontrol cmd, void *arg)
{
- switch (cmd) {
- case AOCONTROL_HAS_TEMP_VOLUME:
- return !ao->no_persistent_volume;
- case AOCONTROL_HAS_PER_APP_VOLUME:
- return !!ao->per_application_mixer;
- default:
- if (ao->api->control)
- return ao->api->control(ao, cmd, arg);
- }
- return CONTROL_UNKNOWN;
+ return ao->api->control ? ao->api->control(ao, cmd, arg) : CONTROL_UNKNOWN;
}
// Return size of the buffered data in seconds. Can include the device latency.