all repos — mgba @ e18c10e5e15fb7e7f8ae18699bc49a737916afd4

mGBA Game Boy Advance Emulator

Qt: Set default sample rate
Jeffrey Pfau jeffrey@endrift.com
Sat, 15 Aug 2015 15:31:24 -0700
commit

e18c10e5e15fb7e7f8ae18699bc49a737916afd4

parent

e528f673b8c478a77b0e100590961edfe957259d

2 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/ConfigController.cppsrc/platform/qt/ConfigController.cpp

@@ -108,6 +108,7 @@ m_opts.audioSync = GameController::AUDIO_SYNC;

m_opts.videoSync = GameController::VIDEO_SYNC; m_opts.fpsTarget = 60; m_opts.audioBuffers = 1536; + m_opts.sampleRate = 44100; m_opts.volume = GBA_AUDIO_VOLUME_MAX; m_opts.logLevel = GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL | GBA_LOG_STATUS; m_opts.rewindEnable = false;
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -599,6 +599,9 @@ }

} void GameController::setAudioSampleRate(unsigned rate) { + if (!rate) { + return; + } if (m_audioProcessor) { threadInterrupt(); redoSamples(m_audioProcessor->getBufferSamples());