fixed progress bar
This commit is contained in:
@ -137,6 +137,11 @@ void Audio::shuffle(){
|
||||
|
||||
bool Audio::ensureStream(){
|
||||
if(audioStream) return true;
|
||||
// Ensure audio spec is initialized
|
||||
if (!init()) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "[Audio] Failed to initialize audio spec before opening device stream");
|
||||
return false;
|
||||
}
|
||||
audioStream = SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &outSpec, &Audio::streamCallback, this);
|
||||
if(!audioStream){
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "[Audio] SDL_OpenAudioDeviceStream failed: %s", SDL_GetError());
|
||||
|
||||
Reference in New Issue
Block a user