diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-04-11 14:40:27 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-04-11 14:40:27 +0200 |
commit | 52688dad72542b7f3f7bce7a8ff0d7fd7827c5ea (patch) | |
tree | 01f1a4f8ff2209f15e1eed2d621e650a5cf44595 /include | |
parent | f8322c3c2838635d4a09b36811367b4dcdd7d751 (diff) |
Time based audio latency, test, might fix some shits
Diffstat (limited to 'include')
-rw-r--r-- | include/sound.hpp | 5 |
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(); |