summaryrefslogtreecommitdiff
path: root/src/sink.h
blob: e47b8ffe1e69d474c59679bbeb2c733518e0534f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef SINK_H
#define SINK_H

#include <stdio.h>
#include <pulse/pulseaudio.h>
#include <ncurses.h>
#include <string.h>
#include <stdlib.h>

#include "sink_input.h"

typedef struct _sink_info {
	uint32_t index;
	char* name;
	char* device;
	int mute;
	uint8_t channels;
	pa_volume_t vol;
	
	// input list
	int input_counter;
	int input_max;
	sink_input_info** input_list;
} sink_info;

sink_info* sink_init(void);
void sink_clear(sink_info*);

void sink_check(sink_info**);
void sink_list_check(sink_info***, uint32_t*, uint32_t);
void sink_check_input_list(sink_info*);

sink_info** sink_list_init(uint32_t);
void sink_list_reset(sink_info**, uint32_t*);
void sink_list_clear(sink_info**, uint32_t*, uint32_t*);

#endif