diff --git a/include/audio/miniaudio_device.hpp b/include/audio/miniaudio_device.hpp index 769f0a787..516c16025 100644 --- a/include/audio/miniaudio_device.hpp +++ b/include/audio/miniaudio_device.hpp @@ -16,10 +16,9 @@ class MiniAudioDevice { ma_device device; ma_context context; ma_device_config deviceConfig; - ma_resampler resampler; Samples* samples = nullptr; - AudioDeviceConfig& audioSettings; + const AudioDeviceConfig& audioSettings; bool initialized = false; bool running = false; @@ -29,7 +28,7 @@ class MiniAudioDevice { std::vector audioDevices; public: - MiniAudioDevice(AudioDeviceConfig& audioSettings); + MiniAudioDevice(const AudioDeviceConfig& audioSettings); // If safe is on, we create a null audio device void init(Samples& samples, bool safe = false); diff --git a/src/core/audio/miniaudio_device.cpp b/src/core/audio/miniaudio_device.cpp index 8965e71cf..b513450ed 100644 --- a/src/core/audio/miniaudio_device.cpp +++ b/src/core/audio/miniaudio_device.cpp @@ -7,7 +7,7 @@ #include "helpers.hpp" -MiniAudioDevice::MiniAudioDevice(AudioDeviceConfig& audioSettings) +MiniAudioDevice::MiniAudioDevice(const AudioDeviceConfig& audioSettings) : initialized(false), running(false), samples(nullptr), audioSettings(audioSettings) {} void MiniAudioDevice::init(Samples& samples, bool safe) {