Don't reserve audio buffer if sound is disabled.

This commit is contained in:
Stephen Anthony 2025-05-26 18:14:08 -02:30
parent a4bd8a562b
commit d2436a2637
1 changed files with 3 additions and 3 deletions

View File

@ -52,14 +52,14 @@ SoundSDL::SoundSDL(OSystem& osystem, AudioSettings& audioSettings)
return;
}
// Reserve 8K for the audio buffer; seems to be enough on most systems
myBuffer.reserve(8_KB);
SDL_zero(mySpec);
if(!myAudioSettings.enabled())
Logger::info("Sound disabled\n");
Logger::debug("SoundSDL::SoundSDL initialized");
// Reserve 8K for the audio buffer; seems to be enough on most systems
myBuffer.reserve(8_KB);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -