summaryrefslogtreecommitdiffstats
path: root/driver.h
blob: 5c98070610b71eb29d88cf1363204ba53998a1bc (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
#ifndef foodriverhfoo
#define foodriverhfoo

#include "sydney.h"

int driver_open(sa_stream_t *dev);
int driver_destroy(sa_stream_t *dev);
int driver_start_thread(sa_stream_t *dev, sa_event_callback_t *callback);

int driver_change_device(sa_stream_t *dev, const char *device_name);
int driver_change_read_volume(sa_stream_t *dev, const int32_t vol[]);
int driver_change_write_volume(sa_stream_t *dev, const int32_t vol[]);
int driver_change_rate(sa_stream_t *dev, unsigned rate);
int driver_change_meta_data(sa_stream_t *dev, const char *name, const void *data, size_t size);

int driver_get_state(sa_stream_t *dev, sa_state_t *state);
int driver_get_position(sa_stream_t *dev, sa_position_t position, int64_t *pos);

int driver_pread(sa_stream_t *dev, void *data, size_t nbytes, int64_t offset, sa_seek_t whence);
int driver_pwrite(sa_stream_t *dev, const void *data, size_t nbytes, int64_t offset, sa_seek_t whence);
int driver_pread_ni(sa_stream_t *dev, unsigned channel, void *data, size_t nbytes, int64_t offset, sa_seek_t whence);
int driver_pwrite_ni(sa_stream_t *dev, unsigned channel, const void *data, size_t nbytes, int64_t offset, sa_seek_t whence);

int driver_get_read_size(sa_stream_t *dev, size_t *size);
int driver_get_write_size(sa_stream_t *dev, size_t *size);

int driver_resume(sa_stream_t *dev);
int driver_pause(sa_stream_t *dev);
int driver_drain(sa_stream_t *dev);

#endif