diff options
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/audio_driver_dummy.cpp | 20 | ||||
-rw-r--r-- | servers/audio/audio_driver_dummy.h | 17 | ||||
-rw-r--r-- | servers/audio/audio_stream.cpp | 4 |
3 files changed, 21 insertions, 20 deletions
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp index ed140c2244..e6257d9260 100644 --- a/servers/audio/audio_driver_dummy.cpp +++ b/servers/audio/audio_driver_dummy.cpp @@ -52,7 +52,7 @@ Error AudioDriverDummy::init() { } return OK; -}; +} void AudioDriverDummy::thread_func(void *p_udata) { AudioDriverDummy *ad = static_cast<AudioDriverDummy *>(p_udata); @@ -68,31 +68,31 @@ void AudioDriverDummy::thread_func(void *p_udata) { ad->stop_counting_ticks(); ad->unlock(); - }; + } OS::get_singleton()->delay_usec(usdelay); - }; -}; + } +} void AudioDriverDummy::start() { active.set(); -}; +} int AudioDriverDummy::get_mix_rate() const { return mix_rate; -}; +} AudioDriver::SpeakerMode AudioDriverDummy::get_speaker_mode() const { return speaker_mode; -}; +} void AudioDriverDummy::lock() { mutex.lock(); -}; +} void AudioDriverDummy::unlock() { mutex.unlock(); -}; +} void AudioDriverDummy::set_use_threads(bool p_use_threads) { use_threads = p_use_threads; @@ -141,7 +141,7 @@ void AudioDriverDummy::finish() { if (samples_in) { memdelete_arr(samples_in); - }; + } } AudioDriverDummy::AudioDriverDummy() { diff --git a/servers/audio/audio_driver_dummy.h b/servers/audio/audio_driver_dummy.h index 8c858a2483..823bad1d2e 100644 --- a/servers/audio/audio_driver_dummy.h +++ b/servers/audio/audio_driver_dummy.h @@ -59,17 +59,18 @@ class AudioDriverDummy : public AudioDriver { static AudioDriverDummy *singleton; public: - const char *get_name() const { + virtual const char *get_name() const override { return "Dummy"; }; - virtual Error init(); - virtual void start(); - virtual int get_mix_rate() const; - virtual SpeakerMode get_speaker_mode() const; - virtual void lock(); - virtual void unlock(); - virtual void finish(); + virtual Error init() override; + virtual void start() override; + virtual int get_mix_rate() const override; + virtual SpeakerMode get_speaker_mode() const override; + + virtual void lock() override; + virtual void unlock() override; + virtual void finish() override; void set_use_threads(bool p_use_threads); void set_speaker_mode(SpeakerMode p_mode); diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 90997ac16e..32ee650f8d 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -367,7 +367,7 @@ void AudioStreamPlaybackMicrophone::start(double p_from_pos) { input_ofs = 0; - if (AudioDriver::get_singleton()->capture_start() == OK) { + if (AudioDriver::get_singleton()->input_start() == OK) { active = true; begin_resample(); } @@ -375,7 +375,7 @@ void AudioStreamPlaybackMicrophone::start(double p_from_pos) { void AudioStreamPlaybackMicrophone::stop() { if (active) { - AudioDriver::get_singleton()->capture_stop(); + AudioDriver::get_singleton()->input_stop(); active = false; } } |