| 235 | //----------------------------------------------------------------------------- |
| 236 | |
| 237 | void SFXBuffer::destroySelf() |
| 238 | { |
| 239 | AssertFatal( !isDead(), "SFXBuffer::destroySelf() - buffer already dead" ); |
| 240 | |
| 241 | mIsDead = true; |
| 242 | if( !mAsyncState ) |
| 243 | { |
| 244 | // Easy way. This buffer has finished all its async |
| 245 | // processing, so we can just kill it. |
| 246 | |
| 247 | delete this; |
| 248 | } |
| 249 | else |
| 250 | { |
| 251 | // Hard way. We will have to make the buffer finish |
| 252 | // all its concurrent stuff, so we mark it dead, make sure |
| 253 | // to see an update, and then wait for the buffer to surface |
| 254 | // on the dead buffer list. |
| 255 | |
| 256 | SFXInternal::TriggerUpdate(); |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | //----------------------------------------------------------------------------- |
| 261 |
no test coverage detected