aplay/pipewire: Log format on param change

This commit is contained in:
Martin Piatka
2023-06-26 14:56:44 +02:00
parent 6dceaa5996
commit f1c4daab4f

View File

@@ -209,6 +209,11 @@ static void on_param_changed(void *state, uint32_t id, const struct spa_pod *par
spa_format_audio_raw_parse(param, &audio_params.info.raw);
log_msg(LOG_LEVEL_NOTICE, MOD_NAME "Pipewire format change: %s, %u ch, %uHz\n",
spa_debug_type_find_short_name(spa_type_audio_format, audio_params.info.raw.format),
audio_params.info.raw.channels,
audio_params.info.raw.rate);
assert(audio_params.info.raw.rate == (unsigned) s->desc.sample_rate);
assert(audio_params.info.raw.channels == (unsigned) s->desc.ch_count);
assert(audio_params.info.raw.format == get_pw_format_from_bps(s->desc.bps));