From a3e2019c2d0e5157c3a744be00db3a9ca255aae7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 Nov 2013 23:18:09 +0100 Subject: ao: print requested audio format on init Also remove the rather bad/incomplete log calls from ao_alsa and ao_oss. --- audio/out/ao.c | 4 ++++ audio/out/ao_alsa.c | 3 --- audio/out/ao_oss.c | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'audio') diff --git a/audio/out/ao.c b/audio/out/ao.c index ccbcc16e88..88f0b2223d 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -153,6 +153,10 @@ static struct ao *ao_create(bool probing, struct mpv_global *global, if (m_config_set_obj_params(config, args) < 0) goto error; ao->priv = config->optstruct; + char *chmap = mp_chmap_to_str(&ao->channels); + MP_VERBOSE(ao, "requested format: %d Hz, %s channels, %s\n", + ao->samplerate, chmap, af_fmt_to_str(ao->format)); + talloc_free(chmap); if (ao->driver->init(ao) < 0) goto error; ao->bps = ao->channels.num * ao->samplerate * af_fmt2bits(ao->format) / 8; diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 2d8587a28c..1a243f9038 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -375,9 +375,6 @@ static int init(struct ao *ao) struct priv *p = ao->priv; - MP_VERBOSE(ao, "requested format: %d Hz, %d channels, %x\n", - ao->samplerate, ao->channels.num, ao->format); - p->prepause_frames = 0; p->delay_before_pause = 0; diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 1a28267613..556f3c25c9 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -204,9 +204,6 @@ static int init(struct ao *ao) if (p->cfg_oss_mixer_channel && p->cfg_oss_mixer_channel[0]) mchan = p->cfg_oss_mixer_channel; - MP_VERBOSE(ao, "%d Hz %d chans %s\n", ao->samplerate, - ao->channels.num, af_fmt_to_str(ao->format)); - if (mchan) { int fd, devs, i; -- cgit v1.2.3