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

#include <sys/types.h>

#include "macro.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, sa_bool_t interleave);

#endif