aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/sound.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound.hpp')
-rw-r--r--include/sound.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sound.hpp b/include/sound.hpp
index c7164f8..6d903d8 100644
--- a/include/sound.hpp
+++ b/include/sound.hpp
@@ -71,6 +71,13 @@ int sound_device_get_by_name(SoundDevice *device, const char *node_name, const c
void sound_device_close(SoundDevice *device);
/*
+ Discards the audio that has been captured so far.
+ Call this before the first call to sound_device_read_next_chunk to not get audio that was captured before that point,
+ since the sound device can be created a while before audio capture starts.
+*/
+void sound_device_flush(SoundDevice *device);
+
+/*
Returns the next chunk of audio into @buffer.
Returns the number of frames read, or a negative value on failure.
*/