aboutsummaryrefslogtreecommitdiff
path: root/src/audio.h
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-10-22 23:53:29 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-10-22 23:53:29 +0300
commitf45b143dcf90970122436d10bd6226f577a9310d (patch)
tree986563759bf1f5935e15a66613e673e445b26e97 /src/audio.h
parentf4c66a4c77e5818ca9703f59a80ea92e27ed45c6 (diff)
works with alsa and runs at 30 fpsHEADmaster
Diffstat (limited to 'src/audio.h')
-rw-r--r--src/audio.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/audio.h b/src/audio.h
index 2ca554d..0b6fbab 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -1,8 +1,22 @@
#ifndef AUDIO_H
#define AUDIO_H
-int audio_play(char *buf);
+typedef struct audio_handle {
+ void *h;
+ unsigned long frames;
+} audio_handle;
-int audio_record(char *buf);
+typedef enum audio_handle_types {
+ RECORD,
+ PLAYBACK
+} audio_handle_types;
+
+int audio_create(audio_handle *handle, audio_handle_types t);
+
+int audio_play(audio_handle *handle, char *buf);
+
+int audio_record(audio_handle *handle, char *buf);
+
+void audio_destroy(audio_handle *handle);
#endif