| 188 | //----------------------------------------------------------------------------- |
| 189 | |
| 190 | void SFXSound::_setBuffer( SFXBuffer* buffer ) |
| 191 | { |
| 192 | mBuffer = buffer; |
| 193 | |
| 194 | // There is no telling when the device will be |
| 195 | // destroyed and the buffers deleted. |
| 196 | // |
| 197 | // By caching the duration now we can allow sources |
| 198 | // to continue virtual playback until the device |
| 199 | // is restored. |
| 200 | mDuration = mBuffer->getDuration(); |
| 201 | } |
| 202 | |
| 203 | //----------------------------------------------------------------------------- |
| 204 | |