| 392 | //----------------------------------------------------------------------------- |
| 393 | |
| 394 | void SFXSound::_play() |
| 395 | { |
| 396 | Parent::_play(); |
| 397 | |
| 398 | if( mVoice ) |
| 399 | mVoice->play( isLooping() ); |
| 400 | else |
| 401 | { |
| 402 | // To ensure the fastest possible reaction |
| 403 | // to this playback let the system reassign |
| 404 | // voices immediately. |
| 405 | SFX->_assignVoice( this ); |
| 406 | |
| 407 | // If we did not get assigned a voice, we'll be |
| 408 | // running virtualized. |
| 409 | |
| 410 | #ifdef DEBUG_SPEW |
| 411 | if( !mVoice ) |
| 412 | Platform::outputDebugString( "[SFXSound] virtualizing playback of source '%i'", getId() ); |
| 413 | #endif |
| 414 | } |
| 415 | if(getPosition() != mSetPositionValue) |
| 416 | setPosition(mSetPositionValue); |
| 417 | mSetPositionValue = 0; //Non looping sounds need this to reset. |
| 418 | } |
| 419 | |
| 420 | //----------------------------------------------------------------------------- |
| 421 |
nothing calls this directly
no test coverage detected