mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 05:57:44 +00:00
audio: Made some SDL_AudioDevice fields atomic.
This makes sure they're properly communicated to the audio threads.
This commit is contained in:
@@ -63,12 +63,10 @@ HandleAudioProcess(_THIS)
|
||||
int bytes = SDL_AUDIO_BITSIZE(this->spec.format) / 8;
|
||||
int bytes_in = SDL_AUDIO_BITSIZE(this->convert.src_format) / 8;
|
||||
|
||||
/* Only do soemthing if audio is enabled */
|
||||
if (!this->enabled)
|
||||
return;
|
||||
|
||||
if (this->paused)
|
||||
/* Only do something if audio is enabled */
|
||||
if (!SDL_AtomicGet(&this->enabled) || SDL_AtomicGet(&this->paused)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->convert.needed) {
|
||||
if (this->hidden->conv_in_len != 0) {
|
||||
|
||||
Reference in New Issue
Block a user