From bbab5c6b9338bf170eb92d25203fb7f7d4d75c53 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Nov 2023 17:40:41 +0100 Subject: [PATCH] (Android) Fixed some compile errors --- es-app/src/VolumeControl.cpp | 14 +++++++------- es-app/src/VolumeControl.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/es-app/src/VolumeControl.cpp b/es-app/src/VolumeControl.cpp index e3fd447a2..0d240b9cd 100644 --- a/es-app/src/VolumeControl.cpp +++ b/es-app/src/VolumeControl.cpp @@ -15,14 +15,14 @@ #include #endif -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) std::string VolumeControl::mixerName = "Master"; std::string VolumeControl::mixerCard = "default"; #endif VolumeControl::VolumeControl() // clang-format off -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) : mixerIndex {0} , mixerHandle {nullptr} , mixerElem {nullptr} @@ -39,7 +39,7 @@ VolumeControl::VolumeControl() VolumeControl::~VolumeControl() { deinit(); -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) snd_config_update_free_global(); #endif } @@ -48,7 +48,7 @@ void VolumeControl::init() { // Initialize audio mixer interface. -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) // Try to open mixer device. if (mixerHandle == nullptr) { snd_mixer_selem_id_alloca(&mixerSelemId); @@ -139,7 +139,7 @@ void VolumeControl::deinit() { // Deinitialize audio mixer interface. -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) if (mixerHandle != nullptr) { snd_mixer_detach(mixerHandle, mixerCard.c_str()); snd_mixer_free(mixerHandle); @@ -160,7 +160,7 @@ int VolumeControl::getVolume() const { int volume = 0; -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) if (mixerElem != nullptr) { // Get volume range. long minVolume; @@ -204,7 +204,7 @@ void VolumeControl::setVolume(int volume) { volume = glm::clamp(volume, 0, 100); -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) if (mixerElem != nullptr) { // Get volume range. long minVolume; diff --git a/es-app/src/VolumeControl.h b/es-app/src/VolumeControl.h index 8a002e569..5b031afbb 100644 --- a/es-app/src/VolumeControl.h +++ b/es-app/src/VolumeControl.h @@ -11,7 +11,7 @@ #include -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) #include #include #include @@ -33,7 +33,7 @@ public: int getVolume() const; void setVolume(int volume); -#if defined(__linux__) +#if defined(__linux__) && !defined(__ANDROID__) static std::string mixerName; static std::string mixerCard; int mixerIndex;