| 242 | //----------------------------------------------------------------------------- |
| 243 | |
| 244 | void SFXVoice::stop() |
| 245 | { |
| 246 | while( mStatus != SFXStatusStopped && |
| 247 | mStatus != SFXStatusNull ) |
| 248 | { |
| 249 | if( dCompareAndSwap( ( U32& ) mStatus, ( U32 ) SFXStatusPlaying, ( U32 ) SFXStatusTransition ) || |
| 250 | dCompareAndSwap( ( U32& ) mStatus, SFXStatusPaused, SFXStatusTransition ) || |
| 251 | dCompareAndSwap( ( U32& ) mStatus, SFXStatusBlocked, SFXStatusTransition ) ) |
| 252 | { |
| 253 | _stop(); |
| 254 | dCompareAndSwap( ( U32& ) mStatus, SFXStatusTransition, SFXStatusStopped ); |
| 255 | |
| 256 | break; |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | //----------------------------------------------------------------------------- |
| 262 |
no test coverage detected