summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.c25
-rw-r--r--src/pa-sink-ctl.c20
-rw-r--r--src/sink.c2
3 files changed, 2 insertions, 45 deletions
diff --git a/src/interface.c b/src/interface.c
index 367eb8d..450315b 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -30,7 +30,6 @@ extern pa_context* context;
void interface_init(void)
{
- // ncurses
chooser_sink = 0;
chooser_input = -1;
@@ -56,7 +55,6 @@ void print_sink_list(void) {
werase(menu_win);
box(menu_win, 0, 0);
-
/* derive chooser_input from selected_index (this is set when input is moved) */
if (chooser_input == -2) {
chooser_input = -1; /* if index is going to be not found, select the sink itself */
@@ -68,10 +66,6 @@ void print_sink_list(void) {
}
}
}
-
-// printf("print sinks: %d\n", sink_input_counter);
-
-// qsort(sink_input_list, sink_input_counter, sizeof(sink_input_info*), cmp_sink_input_list);
for (i = 0; i < sink_counter; ++i) {
@@ -90,22 +84,6 @@ void print_sink_list(void) {
offset += sink_list[i]->input_counter;
}
- y += i;
-/* for (i = 0; i < sink_input_counter; ++i) {
- if (i == chooser)
- wattron(menu_win, A_REVERSE);
-
- mvwprintw(menu_win, y+i, x, "%d\t%s\t",
- sink_input_list[i]->sink,
- sink_input_list[i]->name);
-
- if (i == chooser)
- wattroff(menu_win, A_REVERSE);
-
- print_volume(sink_input_list[i]->vol, y+i);
- }*/
-// clear();
-// refresh();
}
void print_input_list(int sink_num) {
@@ -273,9 +251,6 @@ void get_input(void)
}
collect_all_info();
-// pa_operation_unref(pa_context_get_sink_info_list(context, get_sink_info_callback, NULL));
-// sink_input_counter = 0;
-// pa_operation_unref(pa_context_get_sink_input_info_list(context, get_sink_input_info_callback, NULL));
}
void interface_clear(void)
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c
index dac91c0..0d3a5bc 100644
--- a/src/pa-sink-ctl.c
+++ b/src/pa-sink-ctl.c
@@ -84,8 +84,8 @@ void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_READY:
// printf("Menue\n");
collect_all_info();
-// pa_operation_unref(pa_context_get_sink_input_info_list(c, get_sink_input_info_callback, NULL));
break;
+
default:
printf("unknown state\n");
break;
@@ -142,24 +142,6 @@ void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, in
snprintf(t, sizeof(t), "%u", i->owner_module);
snprintf(k, sizeof(k), "%u", i->client);
-/* printf( "Sink Input #%u"
- "\tClient: %s"
- "\tSink: %u"
- "\tMute: %d"
- "\tVolume: %s"
- "\tname: %s"
- "\tpid: %s\n",
- i->index,
- i->client != PA_INVALID_INDEX ? k : "n/a",
- i->sink,
- i->mute,
- pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
- pa_proplist_gets(i->proplist, "application.name"),
- pa_proplist_gets(i->proplist, "application.process.id"));
-*/
-
-// const char *name = pa_proplist_gets(i->proplist, "application.name");
-
int sink_num = i->sink;
int counter = sink_list[sink_num]->input_counter;
// check the length of the list
diff --git a/src/sink.c b/src/sink.c
index c5ac593..8f6b13b 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -49,8 +49,8 @@ void sink_check(sink_info** sink) {
if ((*sink) == NULL)
(*sink) = sink_init();
-// (*sink) = (sink_info*) calloc(1, sizeof(sink_input_info));
}
+
/*
* check the list length and resize the list, if current position = max
*/