summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-11 21:05:11 +0200
committerwm4 <wm4@nowhere>2019-10-11 21:05:11 +0200
commitcde94e83a9eccade65bb03c361b6ae04beb056b4 (patch)
treed02cebaba4f253d810b840844857fd45d54633bf /audio
parentd908fbd5849159509300447e6baa09c58d199169 (diff)
downloadmpv-cde94e83a9eccade65bb03c361b6ae04beb056b4.tar.bz2
mpv-cde94e83a9eccade65bb03c361b6ae04beb056b4.tar.xz
audio/out: rip out old unused app/softvolume reporting
This was all dead code. Commit 995c47da9a (over 3 years ago) removed all uses of the controls. It would be nice if AOs could apply a linear gain volume, that only affects the AO's audio stream for low-latency volume adjust and muting. AOCONTROL_HAS_SOFT_VOLUME was supposed to signal this, but to use it, we'd have to thoroughly check whether it really uses the expected semantics, so there's really nothing useful left in this old code.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao.h4
-rw-r--r--audio/out/ao_coreaudio.c2
-rw-r--r--audio/out/ao_openal.c2
-rw-r--r--audio/out/ao_oss.c4
-rw-r--r--audio/out/ao_pulse.c3
-rw-r--r--audio/out/ao_sndio.c2
-rw-r--r--audio/out/ao_wasapi.c4
7 files changed, 0 insertions, 21 deletions
diff --git a/audio/out/ao.h b/audio/out/ao.h
index f8b3e676fa..f6b984ff30 100644
--- a/audio/out/ao.h
+++ b/audio/out/ao.h
@@ -35,10 +35,6 @@ enum aocontrol {
AOCONTROL_SET_MUTE,
// Has char* as argument, which contains the desired stream title.
AOCONTROL_UPDATE_STREAM_TITLE,
- // the AO does the equivalent of af_volume (return CONTROL_TRUE if yes)
- AOCONTROL_HAS_SOFT_VOLUME,
- // like above, but volume persists (per app), mpv won't restore volume
- AOCONTROL_HAS_PER_APP_VOLUME,
};
// If set, then the queued audio data is the last. Note that after a while, new
diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c
index 45284f72ca..2e02c6842b 100644
--- a/audio/out/ao_coreaudio.c
+++ b/audio/out/ao_coreaudio.c
@@ -117,8 +117,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return get_volume(ao, arg);
case AOCONTROL_SET_VOLUME:
return set_volume(ao, arg);
- case AOCONTROL_HAS_SOFT_VOLUME:
- return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c
index 53571b6d6e..2af9fadb4f 100644
--- a/audio/out/ao_openal.c
+++ b/audio/out/ao_openal.c
@@ -93,8 +93,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_TRUE;
}
- case AOCONTROL_HAS_SOFT_VOLUME:
- return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 6a6253b933..fbc535e413 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -204,10 +204,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
}
return CONTROL_ERROR;
}
-#ifdef SNDCTL_DSP_GETPLAYVOL
- case AOCONTROL_HAS_SOFT_VOLUME:
- return CONTROL_TRUE;
-#endif
}
return CONTROL_UNKNOWN;
}
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
index 1825d9ea6f..5b4ced6f11 100644
--- a/audio/out/ao_pulse.c
+++ b/audio/out/ao_pulse.c
@@ -749,9 +749,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_OK;
}
- case AOCONTROL_HAS_PER_APP_VOLUME:
- return CONTROL_TRUE;
-
case AOCONTROL_UPDATE_STREAM_TITLE: {
char *title = (char *)arg;
pa_threaded_mainloop_lock(priv->mainloop);
diff --git a/audio/out/ao_sndio.c b/audio/out/ao_sndio.c
index 0fa239a945..e5938b7d26 100644
--- a/audio/out/ao_sndio.c
+++ b/audio/out/ao_sndio.c
@@ -61,8 +61,6 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_FALSE;
sio_setvol(p->hdl, vol->left * SIO_MAXVOL / 100);
break;
- case AOCONTROL_HAS_SOFT_VOLUME:
- return CONTROL_TRUE;
default:
return CONTROL_UNKNOWN;
}
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c
index e432266a09..1187ab3140 100644
--- a/audio/out/ao_wasapi.c
+++ b/audio/out/ao_wasapi.c
@@ -340,8 +340,6 @@ static int thread_control_exclusive(struct ao *ao, enum aocontrol cmd, void *arg
if (!(state->vol_hw_support & ENDPOINT_HARDWARE_SUPPORT_MUTE))
return CONTROL_FALSE;
break;
- case AOCONTROL_HAS_PER_APP_VOLUME:
- return CONTROL_FALSE;
}
float volume;
@@ -400,8 +398,6 @@ static int thread_control_shared(struct ao *ao, enum aocontrol cmd, void *arg)
mute = *(bool *)arg;
ISimpleAudioVolume_SetMute(state->pAudioVolume, mute, NULL);
return CONTROL_OK;
- case AOCONTROL_HAS_PER_APP_VOLUME:
- return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}