diff options
Diffstat (limited to 'include/sound.hpp')
-rw-r--r-- | include/sound.hpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/sound.hpp b/include/sound.hpp index b3e34cc..87e2e2d 100644 --- a/include/sound.hpp +++ b/include/sound.hpp @@ -26,6 +26,17 @@ typedef struct { unsigned int frames; } SoundDevice; +struct AudioDevice { + std::string name; + std::string description; +}; + +struct AudioDevices { + std::string default_output; + std::string default_input; + std::vector<AudioDevice> audio_inputs; +}; + enum class AudioInputType { DEVICE, APPLICATION @@ -33,18 +44,12 @@ enum class AudioInputType { struct AudioInput { std::string name; - std::string description; AudioInputType type = AudioInputType::DEVICE; bool inverted = false; }; -struct AudioDevices { - std::string default_output; - std::string default_input; - std::vector<AudioInput> audio_inputs; -}; - struct MergedAudioInputs { + std::string track_name; std::vector<AudioInput> audio_inputs; }; @@ -56,14 +61,12 @@ typedef enum { /* Get a sound device by name, returning the device into the |device| parameter. + |device_name| can be a device name or "default_output" or "default_input". + If the device name is "default_output" or "default_input" then it will automatically switch which + device is records from when the default output/input is changed in the system audio settings. 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); |