mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Removed some obsolete audio settings.
Also set VLC as the default video player on Raspberry Pi.
This commit is contained in:
parent
1c31a8a49e
commit
1d706ec7f3
|
@ -11,27 +11,12 @@
|
|||
#include "Log.h"
|
||||
#include "math/Misc.h"
|
||||
|
||||
#if defined(_RPI_)
|
||||
#include "Settings.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
#include <cmath>
|
||||
#endif
|
||||
|
||||
// The ALSA Audio Card and Audio Device selection code is disabled at the moment.
|
||||
// As PulseAudio controls the sound devices for the desktop environment, it doesn't
|
||||
// make much sense to be able to select ALSA devices directly.
|
||||
// The code is still active for Raspberry Pi though as I'm not sure if this is
|
||||
// useful for that device.
|
||||
// Keeping mixerName and mixerCard at their default values should make sure that
|
||||
// the rest of the volume control code in here compiles and works fine.
|
||||
#if defined(__linux__)
|
||||
#if defined(_RPI_) || defined(_VERO4K_)
|
||||
std::string VolumeControl::mixerName = "PCM";
|
||||
#else
|
||||
std::string VolumeControl::mixerName = "Master";
|
||||
#endif
|
||||
std::string VolumeControl::mixerCard = "default";
|
||||
#endif
|
||||
|
||||
|
@ -83,12 +68,6 @@ void VolumeControl::init()
|
|||
#if defined(__linux__)
|
||||
// Try to open mixer device.
|
||||
if (mixerHandle == nullptr) {
|
||||
#if defined(_RPI_)
|
||||
// Allow user to override the AudioCard and AudioDevice in es_settings.xml.
|
||||
mixerCard = Settings::getInstance()->getString("AudioCard");
|
||||
mixerName = Settings::getInstance()->getString("AudioDevice");
|
||||
#endif
|
||||
|
||||
snd_mixer_selem_id_alloca(&mixerSelemId);
|
||||
// Sets simple-mixer index and name.
|
||||
snd_mixer_selem_id_set_index(mixerSelemId, mixerIndex);
|
||||
|
|
|
@ -187,24 +187,7 @@ void Settings::setDefaults()
|
|||
mBoolMap["ScreensaverVideoScanlines"] = { true, true };
|
||||
mBoolMap["ScreensaverVideoBlur"] = { false, false };
|
||||
|
||||
#if defined(_RPI_)
|
||||
// Sound settings.
|
||||
// The ALSA Audio Card and Audio Device selection code is disabled at the moment.
|
||||
// As PulseAudio controls the sound devices for the desktop environment, it doesn't
|
||||
// make much sense to be able to select ALSA devices directly. Normally (always?)
|
||||
// the selection doesn't make any difference at all. But maybe some PulseAudio
|
||||
// settings could be added later on, if needed.
|
||||
// The code is still active for Raspberry Pi though as I'm not sure if this is
|
||||
// useful for that device.
|
||||
mStringMap["AudioCard"] = { "default", "default" };
|
||||
// Audio out device for volume control.
|
||||
//#endif
|
||||
//#if defined(_RPI_)
|
||||
mStringMap["AudioDevice"] = { "PCM", "PCM" };
|
||||
// Audio out device for Video playback using OMX player.
|
||||
mStringMap["OMXAudioDev"] = { "both", "both" };
|
||||
#endif
|
||||
|
||||
mIntMap["SoundVolumeNavigation"] = { 80, 80 };
|
||||
mIntMap["SoundVolumeVideos"] = { 100, 100 };
|
||||
mBoolMap["GamelistVideoAudio"] = { true, true };
|
||||
|
@ -235,12 +218,12 @@ void Settings::setDefaults()
|
|||
mStringMap["FullscreenMode"] = { "normal", "normal" };
|
||||
#endif
|
||||
#if defined(BUILD_VLC_PLAYER)
|
||||
#if defined(_RPI_)
|
||||
// As the FFmpeg video player is not HW accelerated, use VLC as default on this weak device.
|
||||
mStringMap["VideoPlayer"] = { "vlc", "vlc" };
|
||||
#else
|
||||
mStringMap["VideoPlayer"] = { "ffmpeg", "ffmpeg" };
|
||||
#endif
|
||||
#if defined(_RPI_)
|
||||
mBoolMap["VideoOmxPlayer"] = { false, false };
|
||||
// We're defaulting to OMX Player for full screen video on the Pi.
|
||||
mBoolMap["ScreensaverOmxPlayer"] = { true, true };
|
||||
#endif
|
||||
mStringMap["SaveGamelistsMode"] = { "always", "always" };
|
||||
#if defined(_WIN64)
|
||||
|
@ -394,7 +377,7 @@ void Settings::loadFile()
|
|||
setString(node.attribute("name").as_string(), node.attribute("value").as_string());
|
||||
}
|
||||
|
||||
// Macro to create the get and set functions for the various data types
|
||||
// Macro to create the get and set functions for the various data types.
|
||||
#define SETTINGS_GETSET(type, mapName, getFunction, getDefaultFunction, setFunction) \
|
||||
type Settings::getFunction(const std::string& name) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in a new issue