summaryrefslogtreecommitdiffstats
path: root/src/bbuffer.h
blob: 6394a1136dcf8fe82885808f09328e4f2c63d6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef foosydneybbufferhfoo
#define foosydneybbufferhfoo

#include <sys/types.h>

/* Simple bounce buffer management routines */

typedef struct sa_bbuffer {
    void **data;
    size_t *size;
    unsigned nchannels;
    size_t sample_size;
} sa_bbuffer_t;

int sa_bbuffer_init(sa_bbuffer_t *b, unsigned nchannels, size_t sample_size);
void sa_bbuffer_done(sa_bbuffer_t *b);
void* sa_bbuffer_get(sa_bbuffer_t *b, unsigned channel, size_t size, int interleave);

#endif