diff options
author | wm4 <wm4@nowhere> | 2015-10-26 15:52:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-26 15:52:08 +0100 |
commit | ec27d573f492f30c1111678273d56f922330fdcd (patch) | |
tree | 916878a99712de58e3e012d5536311340de8a97d /audio/out | |
parent | 72d3c5ef00a71f4620279e0883c86894f145939d (diff) |
audio: always log channel maps before determining final map
Until now, this was done only in debug verbosity, while some AOs logged
equivalent information in verbose mode. Clean this up.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao.c | 15 | ||||
-rw-r--r-- | audio/out/ao_alsa.c | 6 | ||||
-rwxr-xr-x | audio/out/ao_wasapi_utils.c | 4 |
3 files changed, 8 insertions, 17 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c index 6330ec9d48..02dff063ff 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -421,18 +421,11 @@ void ao_hotplug_event(struct ao *ao) bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s, struct mp_chmap *map) { - if (mp_msg_test(ao->log, MSGL_DEBUG)) { - for (int i = 0; i < s->num_chmaps; i++) { - struct mp_chmap c = s->chmaps[i]; - MP_DBG(ao, "chmap_sel #%d: %s (%s)\n", i, mp_chmap_to_str(&c), - mp_chmap_to_str_hr(&c)); - } - } + MP_VERBOSE(ao, "Channel layouts:\n"); + mp_chmal_sel_log(s, ao->log, MSGL_V); bool r = mp_chmap_sel_adjust(s, map); - if (r) { - MP_DBG(ao, "result: %s (%s)\n", mp_chmap_to_str(map), - mp_chmap_to_str_hr(map)); - } + if (r) + MP_VERBOSE(ao, "result: %s\n", mp_chmap_to_str(map)); return r; } diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index d1afab2389..2b3e8e0658 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -328,9 +328,9 @@ static bool query_chmaps(struct ao *ao, struct mp_chmap *chmap) if (mp_chmap_is_valid(&entry)) { if (maps[i]->type == SND_CHMAP_TYPE_VAR) mp_chmap_reorder_norm(&entry); - MP_VERBOSE(ao, "Got supported channel map: %s (type %s)\n", - mp_chmap_to_str(&entry), - snd_pcm_chmap_type_name(maps[i]->type)); + MP_DBG(ao, "Got supported channel map: %s (type %s)\n", + mp_chmap_to_str(&entry), + snd_pcm_chmap_type_name(maps[i]->type)); mp_chmap_sel_add_map(&chmap_sel, &entry); } else { char tmp[128]; diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index fd65cc82eb..1f885004a9 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -486,10 +486,8 @@ static bool search_channels(struct ao *ao, WAVEFORMATEXTENSIBLE *wformat) } } else { change_waveformat_channels(wformat, &entry); - if (try_format_exclusive(ao, wformat)) { + if (try_format_exclusive(ao, wformat)) mp_chmap_sel_add_map(&chmap_sel, &entry); - MP_VERBOSE(ao, "%s is supported\n", mp_chmap_to_str(&entry)); - } } } |