mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
*tunneled* pulseaudio sinks do not have any card associated to them.
This commit is contained in:
parent
271ca6dc97
commit
ddf8a0f58f
@ -217,10 +217,12 @@ void init_pulseaudio(struct text_object *obj) {
|
||||
PULSEAUDIO_WAIT(pa_context_get_sink_info_by_name(pulseaudio->context, pulseaudio->result.sink_name.c_str(),
|
||||
pa_sink_info_callback, &pulseaudio->result));
|
||||
|
||||
if (pulseaudio->result.sink_name.empty() || pulseaudio->result.sink_card==(uint32_t)-1){
|
||||
if (pulseaudio->result.sink_name.empty()){
|
||||
NORM_ERR("Incorrect pulseaudio sink information.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(pulseaudio->result.sink_card!=(uint32_t)-1)
|
||||
PULSEAUDIO_WAIT(pa_context_get_card_info_by_index(pulseaudio->context, pulseaudio->result.sink_card,
|
||||
pa_card_info_callback, &pulseaudio->result));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user