2 * The Ursary Audio Controls
4 * (c) 2014 Martin Mares <mj@ucw.cz>
7 #include <pulse/pulseaudio.h>
9 #define SET_STRING(_field, _val) do { if (!_field || strcmp(_field, _val)) { xfree(_field); _field = xstrdup(_val); } } while (0)
13 void schedule_update(void);
15 void notify_rotary(int rotary, int delta);
16 void notify_touch(int rotary, int on);
17 void notify_button(int button, int on);
22 bool noct_is_ready(void);
23 void noct_set_ring(int ring, int mode, int val);
24 void noct_set_button(int button, int val);
25 void noct_clear(void);
27 extern char noct_rotary_touched[10]; // 8=center, 9=slider
28 extern char noct_button_pressed[16];
42 void dmx_set_pwm(uint index, uint val);
43 bool dmx_is_ready(void);
47 extern char *pulse_default_sink_name;
80 struct pulse_sink_input {
89 int noct_group_idx; // Used by the high-level logic below
92 extern clist pulse_client_list, pulse_source_list, pulse_sink_list, pulse_sink_input_list;
94 void pulse_init(void);
95 void pulse_dump(void);
96 bool pulse_is_ready(void);
97 struct pulse_source *pulse_source_by_name(const char *name);
98 struct pulse_source *pulse_source_by_idx(int idx);
99 void pulse_source_set_volume(int idx, pa_cvolume *cvol);
100 void pulse_source_set_mute(int idx, bool mute);
101 void pulse_source_set_port(int idx, const char *port);
102 struct pulse_sink *pulse_sink_by_name(const char *name);
103 struct pulse_sink *pulse_sink_by_idx(int idx);
104 void pulse_sink_set_volume(int idx, pa_cvolume *cvol);
105 void pulse_sink_set_mute(int idx, bool mute);
106 void pulse_sink_set_port(int idx, const char *port);
107 void pulse_sink_input_set_volume(int idx, pa_cvolume *cvol);
108 void pulse_sink_input_set_mute(int idx, bool mute);
109 void pulse_sink_input_move(int input_idx, int sink_idx);
110 struct pulse_client *pulse_client_by_idx(int idx);
111 void pulse_server_set_default_sink(const char *name);
115 extern struct pa_mainloop_api pmain_api;
117 void pmain_init(void);
128 extern enum mpd_state mpd_state;
131 const char *mpd_get_player_state(void);
134 void mpd_pause(int arg);