summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interface.c1
-rw-r--r--src/pa-sink-ctl.c2
-rw-r--r--src/sink.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/interface.c b/src/interface.c
index dd00c0e..282dd3f 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -84,6 +84,7 @@ void print_sink_list(void) {
if (i == chooser_sink && chooser_input == -1)
wattroff(menu_win, A_REVERSE);
+ print_volume(sink_list[i]->vol, y+i+offset);
print_input_list(i);
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c
index fce5a84..1417064 100644
--- a/src/pa-sink-ctl.c
+++ b/src/pa-sink-ctl.c
@@ -111,6 +111,8 @@ void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_last, v
sink_check(&(sink_list[sink_counter]));
sink_list[sink_counter]->index = i->index;
sink_list[sink_counter]->mute = i->mute;
+ sink_list[sink_counter]->vol = pa_cvolume_avg(&i->volume);
+ sink_list[sink_counter]->channels = i->volume.channels;
sink_list[sink_counter]->name = strdup(i->name);
++sink_counter;
}
diff --git a/src/sink.h b/src/sink.h
index 03c557f..8bd1624 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -13,6 +13,7 @@ typedef struct _sink_info {
uint32_t index;
char* name;
int mute;
+ uint8_t channels;
pa_volume_t vol;
// input list