summaryrefslogtreecommitdiff
path: root/src/mossrose-channel.h
blob: e1db89d6852228383d48e1714957f4c3c7fbee05 (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 "mossrose-mutex.h"

struct mossrose_channel_t {
	mossrose_mutex_t mutex;
	float *left;
	float *right;
	size_t n_samples;
	size_t pos;
};


void mossrose_channel_init(struct mossrose_channel_t *chan);

int mossrose_channel_set(struct mossrose_channel_t *chan, float *left, float *right, size_t len, int force);

void mossrose_channel_reset(struct mossrose_channel_t *chan);

int mossrose_channel_advance(float *left, float *right, struct mossrose_channel_t *chan);

void mossrose_channel_destroy(struct mossrose_channel_t *chan);

#endif