diff options
Diffstat (limited to 'include/sound.hpp')
-rw-r--r-- | include/sound.hpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/sound.hpp b/include/sound.hpp index 7bcc120..048246b 100644 --- a/include/sound.hpp +++ b/include/sound.hpp @@ -26,6 +26,11 @@ typedef struct { unsigned int frames; } SoundDevice; +enum class AudioInputType { + DEVICE, + APPLICATION +}; + struct AudioInput { std::string name; std::string description; @@ -39,6 +44,8 @@ struct AudioDevices { struct MergedAudioInputs { std::vector<AudioInput> audio_inputs; + AudioInputType type = AudioInputType::DEVICE; + bool inverted = false; }; typedef enum { @@ -48,12 +55,15 @@ typedef enum { } 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. + Get a sound device by name, returning the device into the |device| parameter. 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, AudioFormat audio_format); +/* + Creates a module-combine-sink and connects to it for recording, returning the device into the |device| parameter. + Returns 0 on success, or a negative value on failure. +*/ +int sound_device_create_combined_sink_connect(SoundDevice *device, const char *combined_sink_name, unsigned int num_channels, unsigned int period_frame_size, AudioFormat audio_format); void sound_device_close(SoundDevice *device); |