aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sound.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/sound.hpp b/include/sound.hpp
index 2b07254..c512c31 100644
--- a/include/sound.hpp
+++ b/include/sound.hpp
@@ -3,7 +3,7 @@
typedef struct {
void *handle;
- char *buffer;
+ void *buffer;
int buffer_size;
unsigned int frames;
} SoundDevice;
@@ -14,14 +14,16 @@ typedef struct {
to clean up internal resources.
Returns 0 on success, or a negative value on failure.
*/
-int sound_device_get_by_name(SoundDevice *device, const char *name = "default", unsigned int num_channels = 1, unsigned int period_frame_size = 32);
+int sound_device_get_by_name(SoundDevice *device, const char *name = "default", unsigned int num_channels = 2, unsigned int period_frame_size = 32);
void sound_device_close(SoundDevice *device);
/*
Returns the next chunk of audio into @buffer.
- Returns the size of the buffer, or a negative value on failure.
+ Returns the number of frames read, or a negative value on failure.
*/
-int sound_device_read_next_chunk(SoundDevice *device, char **buffer);
+int sound_device_read_next_chunk(SoundDevice *device, void **buffer);
+
+int sound_device_get_buffer_size(SoundDevice *device);
#endif /* GPU_SCREEN_RECORDER_H */