mirror of
https://github.com/polybar/polybar.git
synced 2024-10-27 05:23:39 -04:00
fix(pulseaudio): warn only if default sink is not same as specified sink
This commit is contained in:
parent
10656a94cb
commit
3af3aea534
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,6 @@ pulseaudio::pulseaudio(const logger& logger, string&& sink_name) : m_log(logger)
|
|||
wait_loop(op, m_mainloop);
|
||||
}
|
||||
if (s_name.empty()) {
|
||||
printf("not found\n");
|
||||
op = pa_context_get_server_info(m_context, get_default_sink_callback, this);
|
||||
if (!op) {
|
||||
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.");
|
||||
o = pa_context_get_sink_info_by_name(m_context, def_s_name.c_str(), sink_info_callback, this);
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue