| 598 | //----------------------------------------------------------------------------- |
| 599 | |
| 600 | SFXSound* SFXSystem::createSourceFromStream( const ThreadSafeRef< SFXStream >& stream, |
| 601 | SFXDescription* description ) |
| 602 | { |
| 603 | AssertFatal( mDevice, "SFXSystem::createSourceFromStream() - no device initialized!" ); |
| 604 | |
| 605 | // We sometimes get null values from script... fail in that case. |
| 606 | |
| 607 | if( !stream || !description ) |
| 608 | return NULL; |
| 609 | |
| 610 | // Create the sound. |
| 611 | |
| 612 | SFXSound* sound = SFXSound::_create( mDevice, stream, description ); |
| 613 | if( !sound ) |
| 614 | return NULL; |
| 615 | |
| 616 | return sound; |
| 617 | } |
| 618 | |
| 619 | //----------------------------------------------------------------------------- |
| 620 | |