From eda2035874309233a3971aed075c0417c1f18ef7 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 8 Aug 2021 00:23:58 +0100 Subject: [PATCH] AudioCommon: rename isValid() to IsValid() --- Source/Core/AudioCommon/AlsaSoundStream.h | 2 +- Source/Core/AudioCommon/AudioCommon.cpp | 22 +++++++++++----------- Source/Core/AudioCommon/NullSoundStream.h | 2 +- Source/Core/AudioCommon/OpenALStream.cpp | 2 +- Source/Core/AudioCommon/OpenALStream.h | 2 +- Source/Core/AudioCommon/OpenSLESStream.h | 2 +- Source/Core/AudioCommon/PulseAudioStream.h | 2 +- Source/Core/AudioCommon/SoundStream.h | 2 +- Source/Core/AudioCommon/WASAPIStream.cpp | 2 +- Source/Core/AudioCommon/WASAPIStream.h | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Source/Core/AudioCommon/AlsaSoundStream.h b/Source/Core/AudioCommon/AlsaSoundStream.h index 37a4db2bf2..d3e34386a7 100644 --- a/Source/Core/AudioCommon/AlsaSoundStream.h +++ b/Source/Core/AudioCommon/AlsaSoundStream.h @@ -25,7 +25,7 @@ public: bool Init() override; bool SetRunning(bool running) override; - static bool isValid() { return true; } + static bool IsValid() { return true; } private: void SoundLoop(); diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index 4b1b812f94..d3bdcde445 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -30,17 +30,17 @@ static std::unique_ptr CreateSoundStreamForBackend(std::string_view { if (backend == BACKEND_CUBEB) return std::make_unique(); - else if (backend == BACKEND_OPENAL && OpenALStream::isValid()) + else if (backend == BACKEND_OPENAL && OpenALStream::IsValid()) return std::make_unique(); else if (backend == BACKEND_NULLSOUND) return std::make_unique(); - else if (backend == BACKEND_ALSA && AlsaSound::isValid()) + else if (backend == BACKEND_ALSA && AlsaSound::IsValid()) return std::make_unique(); - else if (backend == BACKEND_PULSEAUDIO && PulseAudio::isValid()) + else if (backend == BACKEND_PULSEAUDIO && PulseAudio::IsValid()) return std::make_unique(); - else if (backend == BACKEND_OPENSLES && OpenSLESStream::isValid()) + else if (backend == BACKEND_OPENSLES && OpenSLESStream::IsValid()) return std::make_unique(); - else if (backend == BACKEND_WASAPI && WASAPIStream::isValid()) + else if (backend == BACKEND_WASAPI && WASAPIStream::IsValid()) return std::make_unique(); return {}; } @@ -96,7 +96,7 @@ std::string GetDefaultSoundBackend() #if defined ANDROID backend = BACKEND_OPENSLES; #elif defined __linux__ - if (AlsaSound::isValid()) + if (AlsaSound::IsValid()) backend = BACKEND_ALSA; #elif defined(__APPLE__) || defined(_WIN32) backend = BACKEND_CUBEB; @@ -115,15 +115,15 @@ std::vector GetSoundBackends() backends.emplace_back(BACKEND_NULLSOUND); backends.emplace_back(BACKEND_CUBEB); - if (AlsaSound::isValid()) + if (AlsaSound::IsValid()) backends.emplace_back(BACKEND_ALSA); - if (PulseAudio::isValid()) + if (PulseAudio::IsValid()) backends.emplace_back(BACKEND_PULSEAUDIO); - if (OpenALStream::isValid()) + if (OpenALStream::IsValid()) backends.emplace_back(BACKEND_OPENAL); - if (OpenSLESStream::isValid()) + if (OpenSLESStream::IsValid()) backends.emplace_back(BACKEND_OPENSLES); - if (WASAPIStream::isValid()) + if (WASAPIStream::IsValid()) backends.emplace_back(BACKEND_WASAPI); return backends; diff --git a/Source/Core/AudioCommon/NullSoundStream.h b/Source/Core/AudioCommon/NullSoundStream.h index 6d90092425..f186787900 100644 --- a/Source/Core/AudioCommon/NullSoundStream.h +++ b/Source/Core/AudioCommon/NullSoundStream.h @@ -12,5 +12,5 @@ public: bool SetRunning(bool running) override; void SetVolume(int volume) override; - static bool isValid() { return true; } + static bool IsValid() { return true; } }; diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index b2e61dae98..3e56fe8e08 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -83,7 +83,7 @@ static bool InitLibrary() return true; } -bool OpenALStream::isValid() +bool OpenALStream::IsValid() { return InitLibrary(); } diff --git a/Source/Core/AudioCommon/OpenALStream.h b/Source/Core/AudioCommon/OpenALStream.h index bb42bf6689..c252838568 100644 --- a/Source/Core/AudioCommon/OpenALStream.h +++ b/Source/Core/AudioCommon/OpenALStream.h @@ -59,7 +59,7 @@ public: void SetVolume(int volume) override; bool SetRunning(bool running) override; - static bool isValid(); + static bool IsValid(); private: void SoundLoop(); diff --git a/Source/Core/AudioCommon/OpenSLESStream.h b/Source/Core/AudioCommon/OpenSLESStream.h index 588d6a97d3..08e8d0ed4a 100644 --- a/Source/Core/AudioCommon/OpenSLESStream.h +++ b/Source/Core/AudioCommon/OpenSLESStream.h @@ -16,7 +16,7 @@ public: bool Init() override; bool SetRunning(bool running) override { return true; } void SetVolume(int volume) override; - static bool isValid() { return true; } + static bool IsValid() { return true; } private: std::thread thread; diff --git a/Source/Core/AudioCommon/PulseAudioStream.h b/Source/Core/AudioCommon/PulseAudioStream.h index 0be6143552..acbf0dadcb 100644 --- a/Source/Core/AudioCommon/PulseAudioStream.h +++ b/Source/Core/AudioCommon/PulseAudioStream.h @@ -21,7 +21,7 @@ public: bool Init() override; bool SetRunning(bool running) override { return true; } - static bool isValid() { return true; } + static bool IsValid() { return true; } void StateCallback(pa_context* c); void WriteCallback(pa_stream* s, size_t length); void UnderflowCallback(pa_stream* s); diff --git a/Source/Core/AudioCommon/SoundStream.h b/Source/Core/AudioCommon/SoundStream.h index 3fa4a1775a..9e1be0d33f 100644 --- a/Source/Core/AudioCommon/SoundStream.h +++ b/Source/Core/AudioCommon/SoundStream.h @@ -16,7 +16,7 @@ protected: public: SoundStream() : m_mixer(new Mixer(48000)) {} virtual ~SoundStream() {} - static bool isValid() { return false; } + static bool IsValid() { return false; } Mixer* GetMixer() const { return m_mixer.get(); } virtual bool Init() { return false; } virtual void SetVolume(int) {} diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp index efe630689a..d65471226b 100644 --- a/Source/Core/AudioCommon/WASAPIStream.cpp +++ b/Source/Core/AudioCommon/WASAPIStream.cpp @@ -49,7 +49,7 @@ WASAPIStream::~WASAPIStream() m_thread.join(); } -bool WASAPIStream::isValid() +bool WASAPIStream::IsValid() { return true; } diff --git a/Source/Core/AudioCommon/WASAPIStream.h b/Source/Core/AudioCommon/WASAPIStream.h index d0cdaf900c..6f3218cc4b 100644 --- a/Source/Core/AudioCommon/WASAPIStream.h +++ b/Source/Core/AudioCommon/WASAPIStream.h @@ -36,7 +36,7 @@ public: bool Init() override; bool SetRunning(bool running) override; - static bool isValid(); + static bool IsValid(); static std::vector GetAvailableDevices(); static Microsoft::WRL::ComPtr GetDeviceByName(std::string_view name);