Fixed whitespace
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/src/audio/coreaudio/SDL_coreaudio.m b/src/audio/coreaudio/SDL_coreaudio.m
index b6c49ab..813b493 100644
--- a/src/audio/coreaudio/SDL_coreaudio.m
+++ b/src/audio/coreaudio/SDL_coreaudio.m
@@ -376,7 +376,7 @@ static BOOL update_audio_session(_THIS, SDL_bool open)
/* An interruption end notification is not guaranteed to be sent if
we were previously interrupted... resuming if needed when the app
becomes active seems to be the way to go. */
- // Note: object: below needs to be nil, as otherwise it filters by the object, and session doesn't send foreground / active notifications. johna
+ // Note: object: below needs to be nil, as otherwise it filters by the object, and session doesn't send foreground / active notifications. johna
[center addObserver:listener
selector:@selector(applicationBecameActive:)
name:UIApplicationDidBecomeActiveNotification
@@ -417,35 +417,35 @@ outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe
if (!SDL_AtomicGet(&this->enabled) || SDL_AtomicGet(&this->paused)) {
/* Supply silence if audio is not enabled or paused */
SDL_memset(inBuffer->mAudioData, this->spec.silence, inBuffer->mAudioDataBytesCapacity);
- } else if (this->stream ) {
- UInt32 remaining = inBuffer->mAudioDataBytesCapacity;
- Uint8 *ptr = (Uint8 *) inBuffer->mAudioData;
-
- while (remaining > 0) {
- if ( SDL_AudioStreamAvailable(this->stream) == 0 ) {
- /* Generate the data */
- SDL_LockMutex(this->mixer_lock);
- (*this->callbackspec.callback)(this->callbackspec.userdata,
- this->hidden->buffer, this->hidden->bufferSize);
- SDL_UnlockMutex(this->mixer_lock);
- this->hidden->bufferOffset = 0;
- SDL_AudioStreamPut(this->stream, this->hidden->buffer, this->hidden->bufferSize);
- }
- if ( SDL_AudioStreamAvailable(this->stream) > 0 ) {
- int got;
- UInt32 len = SDL_AudioStreamAvailable(this->stream);
- if ( len > remaining )
- len = remaining;
- got = SDL_AudioStreamGet(this->stream, ptr, len);
- SDL_assert((got < 0) || (got == len));
+ } else if (this->stream ) {
+ UInt32 remaining = inBuffer->mAudioDataBytesCapacity;
+ Uint8 *ptr = (Uint8 *) inBuffer->mAudioData;
+
+ while (remaining > 0) {
+ if ( SDL_AudioStreamAvailable(this->stream) == 0 ) {
+ /* Generate the data */
+ SDL_LockMutex(this->mixer_lock);
+ (*this->callbackspec.callback)(this->callbackspec.userdata,
+ this->hidden->buffer, this->hidden->bufferSize);
+ SDL_UnlockMutex(this->mixer_lock);
+ this->hidden->bufferOffset = 0;
+ SDL_AudioStreamPut(this->stream, this->hidden->buffer, this->hidden->bufferSize);
+ }
+ if ( SDL_AudioStreamAvailable(this->stream) > 0 ) {
+ int got;
+ UInt32 len = SDL_AudioStreamAvailable(this->stream);
+ if ( len > remaining )
+ len = remaining;
+ got = SDL_AudioStreamGet(this->stream, ptr, len);
+ SDL_assert((got < 0) || (got == len));
if (got != len) {
SDL_memset(ptr, this->spec.silence, len);
}
- ptr = ptr + len;
- remaining -= len;
- }
- }
- } else {
+ ptr = ptr + len;
+ remaining -= len;
+ }
+ }
+ } else {
UInt32 remaining = inBuffer->mAudioDataBytesCapacity;
Uint8 *ptr = (Uint8 *) inBuffer->mAudioData;