diff options
Diffstat (limited to 'drivers/pulseaudio')
-rw-r--r-- | drivers/pulseaudio/audio_driver_pulseaudio.cpp | 16 | ||||
-rw-r--r-- | drivers/pulseaudio/audio_driver_pulseaudio.h | 35 |
2 files changed, 25 insertions, 26 deletions
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index f96247a473..0246af4fea 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -631,9 +631,9 @@ String AudioDriverPulseAudio::get_output_device() { return output_device_name; } -void AudioDriverPulseAudio::set_output_device(String output_device) { +void AudioDriverPulseAudio::set_output_device(const String &p_name) { lock(); - new_output_device = output_device; + new_output_device = p_name; unlock(); } @@ -761,12 +761,6 @@ Error AudioDriverPulseAudio::input_stop() { return OK; } -void AudioDriverPulseAudio::set_input_device(const String &p_name) { - lock(); - new_input_device = p_name; - unlock(); -} - void AudioDriverPulseAudio::pa_sourcelist_cb(pa_context *c, const pa_source_info *l, int eol, void *userdata) { AudioDriverPulseAudio *ad = static_cast<AudioDriverPulseAudio *>(userdata); @@ -821,6 +815,12 @@ String AudioDriverPulseAudio::get_input_device() { return name; } +void AudioDriverPulseAudio::set_input_device(const String &p_name) { + lock(); + new_input_device = p_name; + unlock(); +} + AudioDriverPulseAudio::AudioDriverPulseAudio() { samples_in.clear(); samples_out.clear(); diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h index 68df03cb60..f4ff44d361 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.h +++ b/drivers/pulseaudio/audio_driver_pulseaudio.h @@ -94,31 +94,30 @@ class AudioDriverPulseAudio : public AudioDriver { static void thread_func(void *p_udata); public: - const char *get_name() const { + virtual const char *get_name() const override { return "PulseAudio"; }; - virtual Error init(); - virtual void start(); - virtual int get_mix_rate() const; - virtual SpeakerMode get_speaker_mode() const; + virtual Error init() override; + virtual void start() override; + virtual int get_mix_rate() const override; + virtual SpeakerMode get_speaker_mode() const override; + virtual float get_latency() override; - virtual PackedStringArray get_output_device_list(); - virtual String get_output_device(); - virtual void set_output_device(String output_device); + virtual void lock() override; + virtual void unlock() override; + virtual void finish() override; - virtual PackedStringArray get_input_device_list(); - virtual void set_input_device(const String &p_name); - virtual String get_input_device(); + virtual PackedStringArray get_output_device_list() override; + virtual String get_output_device() override; + virtual void set_output_device(const String &p_name) override; - virtual void lock(); - virtual void unlock(); - virtual void finish(); + virtual Error input_start() override; + virtual Error input_stop() override; - virtual float get_latency(); - - virtual Error input_start(); - virtual Error input_stop(); + virtual PackedStringArray get_input_device_list() override; + virtual String get_input_device() override; + virtual void set_input_device(const String &p_name) override; AudioDriverPulseAudio(); ~AudioDriverPulseAudio() {} |