summaryrefslogtreecommitdiff
path: root/src/channel.h
blob: 4d0800be3b3d74c3d2a31d46e53d833c5632cb83 (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
#ifndef MOSSROSE_CHANNEL_H
#define MOSSROSE_CHANNEL_H

#include <stddef.h>
#include <stdbool.h>
#include <plibsys.h>
#include <mossrose.h>


struct channel_t {
	volatile pint active; /* boolean */
	volatile pint paused; /* boolean */
	volatile pint volume; /* 0-255 */
	volatile pint pan;    /* -128-127 */

	PMutex *sound_mutex;
	struct mossrose_sound_t sound;
	size_t pos;
};


void channel_init(struct channel_t *chan);
void channel_reset(struct channel_t *chan);


#endif