Mercurial > sdl-ios-xcode
comparison src/audio/macrom/SDL_romaudio.c @ 324:f25f666d609a
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 30 Mar 2002 21:41:01 +0000 |
parents | b7e8038e40ae |
children | 25809353f877 |
comparison
equal
deleted
inserted
replaced
323:b7e8038e40ae | 324:f25f666d609a |
---|---|
145 oldval = DecrementAtomic((SInt32 *) &audio_is_locked); | 145 oldval = DecrementAtomic((SInt32 *) &audio_is_locked); |
146 if ( oldval != 1 ) /* != 1 means audio is still locked. */ | 146 if ( oldval != 1 ) /* != 1 means audio is still locked. */ |
147 return; | 147 return; |
148 | 148 |
149 /* Did we miss the chance to mix in an interrupt? Do it now. */ | 149 /* Did we miss the chance to mix in an interrupt? Do it now. */ |
150 if ( BitAndAtomic (0xFFFFFFFF, &need_to_mix) ) { | 150 if ( BitAndAtomic (0xFFFFFFFF, (UInt32 *) &need_to_mix) ) { |
151 /* | 151 /* |
152 * Note that this could be a problem if you missed an interrupt | 152 * Note that this could be a problem if you missed an interrupt |
153 * while the audio was locked, and get preempted by a second | 153 * while the audio was locked, and get preempted by a second |
154 * interrupt here, but that means you locked for way too long anyhow. | 154 * interrupt here, but that means you locked for way too long anyhow. |
155 */ | 155 */ |
182 | 182 |
183 /* | 183 /* |
184 * if audio device isn't locked, mix the next buffer to be queued in | 184 * if audio device isn't locked, mix the next buffer to be queued in |
185 * the memory block that just finished playing. | 185 * the memory block that just finished playing. |
186 */ | 186 */ |
187 if ( ! BitAndAtomic(0xFFFFFFFF, &audio_is_locked) ) { | 187 if ( ! BitAndAtomic(0xFFFFFFFF, (UInt32 *) &audio_is_locked) ) { |
188 mix_buffer (audio, buffer[fill_me]); | 188 mix_buffer (audio, buffer[fill_me]); |
189 } | 189 } |
190 | 190 |
191 /* set this callback to run again when current buffer drains. */ | 191 /* set this callback to run again when current buffer drains. */ |
192 if ( running ) { | 192 if ( running ) { |