ao: print requested audio format on init

Also remove the rather bad/incomplete log calls from ao_alsa and ao_oss.
This commit is contained in:
wm4 2013-11-09 23:18:09 +01:00
parent 3af094062e
commit a3e2019c2d
3 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;