fix(pulseaudio): warn only if default sink is not same as specified sink
This commit is contained in:
parent
10656a94cb
commit
3af3aea534
@ -56,7 +56,6 @@ pulseaudio::pulseaudio(const logger& logger, string&& sink_name) : m_log(logger)
|
|||||||
wait_loop(op, m_mainloop);
|
wait_loop(op, m_mainloop);
|
||||||
}
|
}
|
||||||
if (s_name.empty()) {
|
if (s_name.empty()) {
|
||||||
printf("not found\n");
|
|
||||||
op = pa_context_get_server_info(m_context, get_default_sink_callback, this);
|
op = pa_context_get_server_info(m_context, get_default_sink_callback, this);
|
||||||
if (!op) {
|
if (!op) {
|
||||||
throw pulseaudio_error("Failed to get pulseaudio server info.");
|
throw pulseaudio_error("Failed to get pulseaudio server info.");
|
||||||
@ -135,7 +134,8 @@ int pulseaudio::process_events() {
|
|||||||
throw pulseaudio_error("Failed to get default sink.");
|
throw pulseaudio_error("Failed to get default sink.");
|
||||||
o = pa_context_get_sink_info_by_name(m_context, def_s_name.c_str(), sink_info_callback, this);
|
o = pa_context_get_sink_info_by_name(m_context, def_s_name.c_str(), sink_info_callback, this);
|
||||||
wait_loop(o, m_mainloop);
|
wait_loop(o, m_mainloop);
|
||||||
m_log.warn("pulseaudio: using default sink %s", s_name);
|
if (spec_s_name != s_name)
|
||||||
|
m_log.warn("pulseaudio: using default sink %s", s_name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user