mirror of https://github.com/mgba-emu/mgba.git
Qt: Set default sample rate
This commit is contained in:
parent
e528f673b8
commit
e18c10e5e1
|
@ -108,6 +108,7 @@ ConfigController::ConfigController(QObject* parent)
|
||||||
m_opts.videoSync = GameController::VIDEO_SYNC;
|
m_opts.videoSync = GameController::VIDEO_SYNC;
|
||||||
m_opts.fpsTarget = 60;
|
m_opts.fpsTarget = 60;
|
||||||
m_opts.audioBuffers = 1536;
|
m_opts.audioBuffers = 1536;
|
||||||
|
m_opts.sampleRate = 44100;
|
||||||
m_opts.volume = GBA_AUDIO_VOLUME_MAX;
|
m_opts.volume = GBA_AUDIO_VOLUME_MAX;
|
||||||
m_opts.logLevel = GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL | GBA_LOG_STATUS;
|
m_opts.logLevel = GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL | GBA_LOG_STATUS;
|
||||||
m_opts.rewindEnable = false;
|
m_opts.rewindEnable = false;
|
||||||
|
|
|
@ -599,6 +599,9 @@ void GameController::setAudioBufferSamples(int samples) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::setAudioSampleRate(unsigned rate) {
|
void GameController::setAudioSampleRate(unsigned rate) {
|
||||||
|
if (!rate) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (m_audioProcessor) {
|
if (m_audioProcessor) {
|
||||||
threadInterrupt();
|
threadInterrupt();
|
||||||
redoSamples(m_audioProcessor->getBufferSamples());
|
redoSamples(m_audioProcessor->getBufferSamples());
|
||||||
|
|
Loading…
Reference in New Issue