mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
Add volume slider & mute audio settings
This commit is contained in:
parent
b251f84ab1
commit
3b6190b69a
7 changed files with 70 additions and 12 deletions
|
@ -4,6 +4,19 @@
|
|||
#include "audio/dsp_core.hpp"
|
||||
#include "renderer.hpp"
|
||||
|
||||
struct AudioDeviceConfig {
|
||||
float volumeRaw = 1.0f;
|
||||
bool muteAudio = false;
|
||||
|
||||
float getVolume() const {
|
||||
if (muteAudio) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return volumeRaw;
|
||||
}
|
||||
};
|
||||
|
||||
// Remember to initialize every field here to its default value otherwise bad things will happen
|
||||
struct EmulatorConfig {
|
||||
// Only enable the shader JIT by default on platforms where it's completely tested
|
||||
|
@ -71,6 +84,7 @@ struct EmulatorConfig {
|
|||
};
|
||||
|
||||
WindowSettings windowSettings;
|
||||
AudioDeviceConfig audioDeviceConfig;
|
||||
|
||||
EmulatorConfig(const std::filesystem::path& path);
|
||||
void load();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue