summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-05 21:07:30 +0200
committerwm4 <wm4@nowhere>2016-09-05 21:26:39 +0200
commit13786dc643fe250a9560792ef342751585ea15e9 (patch)
tree90c76da55639d200558d9372e507da72684194a9 /audio
parent69283bc0f8905e7748343f2c5389791f858a5f4c (diff)
downloadmpv-13786dc643fe250a9560792ef342751585ea15e9.tar.bz2
mpv-13786dc643fe250a9560792ef342751585ea15e9.tar.xz
audio/out: deprecate device sub-options
We have --audio-device, which can force the device. Also add something describing to this extent to the manpage.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_alsa.c2
-rw-r--r--audio/out/ao_openal.c3
-rw-r--r--audio/out/ao_oss.c2
-rw-r--r--audio/out/ao_pulse.c2
-rw-r--r--audio/out/ao_rsound.c6
-rw-r--r--audio/out/ao_sndio.c3
-rw-r--r--audio/out/ao_wasapi.c2
-rw-r--r--audio/out/internal.h3
8 files changed, 15 insertions, 8 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index c542bee030..4d879b1565 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -62,7 +62,7 @@ struct ao_alsa_opts {
#define OPT_BASE_STRUCT struct ao_alsa_opts
static const struct m_sub_options ao_alsa_conf = {
.opts = (const struct m_option[]) {
- OPT_STRING("alsa-device", device, 0),
+ OPT_STRING("alsa-device", device, 0, DEVICE_OPT_DEPRECATION),
OPT_FLAG("alsa-resample", resample, 0),
OPT_STRING("alsa-mixer-device", mixer_device, 0),
OPT_STRING("alsa-mixer-name", mixer_name, 0),
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c
index 41a1a03194..2c29b8923b 100644
--- a/audio/out/ao_openal.c
+++ b/audio/out/ao_openal.c
@@ -356,7 +356,8 @@ const struct ao_driver audio_out_openal = {
.list_devs = list_devs,
.priv_size = sizeof(struct priv),
.options = (const struct m_option[]) {
- OPT_STRING_VALIDATE("device", cfg_device, 0, validate_device_opt),
+ OPT_STRING_VALIDATE("device", cfg_device, 0, validate_device_opt,
+ DEVICE_OPT_DEPRECATION),
{0}
},
.legacy_prefix = "ao-openal",
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index cd08a046f7..5bf5fec29b 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -648,7 +648,7 @@ const struct ao_driver audio_out_oss = {
.oss_mixer_device = PATH_DEV_MIXER,
},
.options = (const struct m_option[]) {
- OPT_STRING("device", dsp, 0),
+ OPT_STRING("device", dsp, 0, DEVICE_OPT_DEPRECATION),
OPT_STRING("mixer-device", oss_mixer_device, 0),
OPT_STRING("mixer-channel", cfg_oss_mixer_channel, 0),
{0}
diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
index 6eedea2b07..5a68553e88 100644
--- a/audio/out/ao_pulse.c
+++ b/audio/out/ao_pulse.c
@@ -836,7 +836,7 @@ const struct ao_driver audio_out_pulse = {
},
.options = (const struct m_option[]) {
OPT_STRING("host", cfg_host, 0),
- OPT_STRING("sink", cfg_sink, 0),
+ OPT_STRING("sink", cfg_sink, 0, DEVICE_OPT_DEPRECATION),
OPT_CHOICE_OR_INT("buffer", cfg_buffer, 0, 1, 2000, ({"native", 0})),
OPT_FLAG("latency-hacks", cfg_latency_hacks, 0),
{0}
diff --git a/audio/out/ao_rsound.c b/audio/out/ao_rsound.c
index 8b80ddf1da..65196d0932 100644
--- a/audio/out/ao_rsound.c
+++ b/audio/out/ao_rsound.c
@@ -156,8 +156,10 @@ const struct ao_driver audio_out_rsound = {
.resume = audio_resume,
.priv_size = sizeof(struct priv),
.options = (const struct m_option[]) {
- OPT_STRING("host", host, 0),
- OPT_STRING("port", port, 0),
+ OPT_STRING("host", host, 0,
+ .deprecation_message = "request --audio-device support on issue tracker"),
+ OPT_STRING("port", port, 0
+ .deprecation_message = "request --audio-device support on issue tracker"),
{0}
},
.legacy_prefix = "rsound",
diff --git a/audio/out/ao_sndio.c b/audio/out/ao_sndio.c
index c53e01cb9e..f60fa303e5 100644
--- a/audio/out/ao_sndio.c
+++ b/audio/out/ao_sndio.c
@@ -320,7 +320,8 @@ const struct ao_driver audio_out_sndio = {
.reset = reset,
.priv_size = sizeof(struct priv),
.options = (const struct m_option[]) {
- OPT_STRING("device", dev, 0, OPTDEF_STR(SIO_DEVANY)),
+ OPT_STRING("device", dev, 0, OPTDEF_STR(SIO_DEVANY),
+ DEVICE_OPT_DEPRECATION),
{0}
},
.legacy_prefix = "ao-sndio",
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c
index 7cdde49ce9..23a958bb3b 100644
--- a/audio/out/ao_wasapi.c
+++ b/audio/out/ao_wasapi.c
@@ -496,7 +496,7 @@ const struct ao_driver audio_out_wasapi = {
.priv_size = sizeof(wasapi_state),
.options = (const struct m_option[]) {
OPT_FLAG("exclusive", opt_exclusive, 0),
- OPT_STRING("device", opt_device, 0),
+ OPT_STRING("device", opt_device, 0, DEVICE_OPT_DEPRECATION),
{NULL},
},
.legacy_prefix = "ao-wasapi",
diff --git a/audio/out/internal.h b/audio/out/internal.h
index 3115fbfeb7..fdbb423f52 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -206,4 +206,7 @@ bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s,
void ao_device_list_add(struct ao_device_list *list, struct ao *ao,
struct ao_device_desc *e);
+#define DEVICE_OPT_DEPRECATION \
+ .deprecation_message = "use --audio-device instead"
+
#endif