summaryrefslogtreecommitdiffstats
path: root/src/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver.h')
-rw-r--r--src/driver.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/driver.h b/src/driver.h
new file mode 100644
index 0000000..be5d4b8
--- /dev/null
+++ b/src/driver.h
@@ -0,0 +1,34 @@
+#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_stop_thread(sa_stream_t *dev);
+
+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_read(sa_stream_t *dev, void *data, size_t nbytes);
+int driver_read_ni(sa_stream_t *dev, unsigned channel, void *data, size_t nbytes);
+
+int driver_pwrite(sa_stream_t *dev, const 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