// SPDX-License-Identifier: MIT // // ES-DE Frontend // VolumeControl.h // // Controls system audio volume. // #ifndef ES_APP_VOLUME_CONTROL_H #define ES_APP_VOLUME_CONTROL_H #include #if defined(__linux__) && !defined(__ANDROID__) #include #include #include #elif defined(_WIN64) #include #include #include #endif class VolumeControl { public: VolumeControl(); ~VolumeControl(); void init(); void deinit(); int getVolume() const; void setVolume(int volume); #if defined(__linux__) && !defined(__ANDROID__) static std::string mixerName; static std::string mixerCard; int mixerIndex; snd_mixer_t* mixerHandle; snd_mixer_elem_t* mixerElem; snd_mixer_selem_id_t* mixerSelemId; #elif defined(_WIN64) HMIXER mixerHandle; MIXERCONTROL mixerControl; IAudioEndpointVolume* endpointVolume; #endif }; #endif // ES_APP_VOLUME_CONTROL_H