aboutsummaryrefslogtreecommitdiff
path: root/include/sound.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-04-11 14:40:27 +0200
committerdec05eba <dec05eba@protonmail.com>2024-04-11 14:40:27 +0200
commit52688dad72542b7f3f7bce7a8ff0d7fd7827c5ea (patch)
tree01f1a4f8ff2209f15e1eed2d621e650a5cf44595 /include/sound.hpp
parentf8322c3c2838635d4a09b36811367b4dcdd7d751 (diff)
Time based audio latency, test, might fix some shits
Diffstat (limited to 'include/sound.hpp')
-rw-r--r--include/sound.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sound.hpp b/include/sound.hpp
index 6873e90..32821bc 100644
--- a/include/sound.hpp
+++ b/include/sound.hpp
@@ -24,6 +24,7 @@
typedef struct {
void *handle;
unsigned int frames;
+ double latency_seconds;
} SoundDevice;
struct AudioInput {
@@ -53,9 +54,9 @@ void sound_device_close(SoundDevice *device);
/*
Returns the next chunk of audio into @buffer.
- Returns the number of frames read, or a negative value on failure.
+ Returns the number of bytes read, or a negative value on failure.
*/
-int sound_device_read_next_chunk(SoundDevice *device, void **buffer);
+int sound_device_read_next_chunk(SoundDevice *device, void **buffer, double timeout_sec);
std::vector<AudioInput> get_pulseaudio_inputs();