audio: Made some SDL_AudioDevice fields atomic.
This makes sure they're properly communicated to the audio threads.
This commit is contained in:
1 parent
b35b9f950e
commit
6d5c9c1e67
11 files changed
+38
-38
No files matched your search
@@ -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