From 5b91ba0a8dd052d5d52309e439398f693d390b1b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Jul 2013 23:27:09 +0200 Subject: 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. --- audio/out/ao_oss.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'audio/out/ao_oss.c') 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; -- cgit v1.2.3