diff options
Diffstat (limited to 'include/sound.hpp')
-rw-r--r-- | include/sound.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/sound.hpp b/include/sound.hpp index 710533e..77bec99 100644 --- a/include/sound.hpp +++ b/include/sound.hpp @@ -31,13 +31,23 @@ struct AudioInput { std::string description; }; +struct MergedAudioInputs { + std::vector<AudioInput> audio_inputs; +}; + +typedef enum { + S16, + S32, + F32 +} AudioFormat; + /* Get a sound device by name, returning the device into the @device parameter. The device should be closed with @sound_device_close after it has been used 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 *device_name, const char *description, unsigned int num_channels, unsigned int period_frame_size); +int sound_device_get_by_name(SoundDevice *device, const char *device_name, const char *description, unsigned int num_channels, unsigned int period_frame_size, AudioFormat audio_format); void sound_device_close(SoundDevice *device); @@ -45,7 +55,7 @@ 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. */ -int sound_device_read_next_chunk(SoundDevice *device, void **buffer); +int sound_device_read_next_chunk(SoundDevice *device, void **buffer, double timeout_sec, double *latency_seconds); std::vector<AudioInput> get_pulseaudio_inputs(); |