Fixed a compilation error on Raspberry Pi.

This commit is contained in:
Leon Styhre 2020-12-17 00:09:26 +01:00
parent debf072a0e
commit b6f15cb8d9
2 changed files with 5 additions and 5 deletions

View file

@ -26,11 +26,11 @@
// the rest of the volume control code in here compiles and works fine.
#if defined(__linux__)
#if defined(_RPI_) || defined(_VERO4K_)
const std::string VolumeControl::mixerName = "PCM";
std::string VolumeControl::mixerName = "PCM";
#else
const std::string VolumeControl::mixerName = "Master";
std::string VolumeControl::mixerName = "Master";
#endif
const std::string VolumeControl::mixerCard = "default";
std::string VolumeControl::mixerCard = "default";
#endif
std::weak_ptr<VolumeControl> VolumeControl::sInstance;

View file

@ -30,8 +30,8 @@ class VolumeControl
#if defined(__APPLE__)
// #error TODO: Not implemented for MacOS yet!!!
#elif defined(__linux__)
static const std::string mixerName;
static const std::string mixerCard;
static std::string mixerName;
static std::string mixerCard;
int mixerIndex;
snd_mixer_t* mixerHandle;
snd_mixer_elem_t* mixerElem;