summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_oss.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-21 23:27:09 +0200
committerwm4 <wm4@nowhere>2013-07-21 23:35:14 +0200
commit5b91ba0a8dd052d5d52309e439398f693d390b1b (patch)
tree7e808ef5420e188fdf736261f7a6ed17c0ec174a /audio/out/ao_oss.c
parent5c610836cd0a301944d018f2020e0304e8b186fa (diff)
downloadmpv-5b91ba0a8dd052d5d52309e439398f693d390b1b.tar.bz2
mpv-5b91ba0a8dd052d5d52309e439398f693d390b1b.tar.xz
options: remove --mixer and --mixer-channel, turn them into alsa/oss subopts
These two options were supported by ALSA and OSS only. Further, their values were specific to the respective audio systems, so it doesn't make sense to keep them as top-level options.
Diffstat (limited to 'audio/out/ao_oss.c')
-rw-r--r--audio/out/ao_oss.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index fa590f7965..6a46bd4db1 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -193,10 +193,10 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
// return: 0=success -1=fail
static int init(struct ao *ao, char *params)
{
- struct MPOpts *opts = ao->opts;
char *mixer_channels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES;
int oss_format;
- char *mdev = opts->mixer_device, *mchan = opts->mixer_channel;
+ char *mdev = PATH_DEV_MIXER;
+ char *mchan = talloc_strdup(ao, mixer_channels[SOUND_MIXER_PCM]);
mp_msg(MSGT_AO, MSGL_V, "ao2: %d Hz %d chans %s\n", ao->samplerate,
ao->channels.num, af_fmt2str_short(ao->format));
@@ -205,8 +205,6 @@ static int init(struct ao *ao, char *params)
*p = (struct priv) {
.dsp = PATH_DEV_DSP,
.audio_fd = -1,
- .oss_mixer_device = mdev ? mdev : PATH_DEV_MIXER,
- .oss_mixer_channel = SOUND_MIXER_PCM,
.audio_delay_method = 2,
.buffersize = -1,
.outburst = 512,
@@ -227,6 +225,7 @@ static int init(struct ao *ao, char *params)
}
p->dsp = talloc_strdup(ao, params);
}
+ p->oss_mixer_device = talloc_strdup(p, mdev);
if (mchan) {
int fd, devs, i;