diff options
author | Emmanouil Papadeas <manoschool@yahoo.gr> | 2023-02-08 17:40:15 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-09 11:02:00 +0100 |
commit | c36460060ea434158c2069d696880cbaf4431123 (patch) | |
tree | 79e045ef1939b8daad696cc0a074778f9c61ae53 /drivers/xaudio2 | |
parent | d69809cab603cae9f525768337affe5e12e454a8 (diff) |
Further refactoring to AudioDriver implementations after #69120.
- Rename all instances of `capture_start()` and `capture_end()` to their new
names. Fixes #72892.
- More internal renames to match what was started in #69120.
- Use `override` consistently so that such refactoring bugs can be caught.
- Harmonize the order of definition of the overridden virtual methods in each
audio driver.
- Harmonize prototype for `set_output_device` and `set_input_device`.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'drivers/xaudio2')
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.cpp | 4 | ||||
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.h | 23 |
2 files changed, 13 insertions, 14 deletions
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index cd1b29e17d..44ce01d4d7 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -33,10 +33,6 @@ #include "core/config/project_settings.h" #include "core/os/os.h" -const char *AudioDriverXAudio2::get_name() const { - return "XAudio2"; -} - Error AudioDriverXAudio2::init() { active.clear(); exit_thread.clear(); diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index df5ef52e88..c659b6ffdc 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -91,16 +91,19 @@ class AudioDriverXAudio2 : public AudioDriver { XAudio2DriverVoiceCallback voice_callback; public: - const char *get_name() const; - - virtual Error init(); - virtual void start(); - virtual int get_mix_rate() const; - virtual SpeakerMode get_speaker_mode() const; - virtual float get_latency(); - virtual void lock(); - virtual void unlock(); - virtual void finish(); + virtual const char *get_name() const override { + return "XAudio2"; + } + + 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 void lock() override; + virtual void unlock() override; + virtual void finish() override; AudioDriverXAudio2(); ~AudioDriverXAudio2() {} |