//----------------------------------------------------------------------------- // Purpose: Simple wrapper to crack naming convention and create the proper wave source // Input : *pName - WAVE filename // Output : CAudioSource //----------------------------------------------------------------------------- CAudioSource *AudioSource_Create( const char *pName ) { if ( !pName ) return NULL; // if ( TestSoundChars(pName, CHAR_SENTENCE) ) // sentence ; // Names that begin with CHAR_STREAM are streaming. // Skip over the CHAR_STREAM and create a streamed source if ( TestSoundChar( pName, CHAR_STREAM ) ) // stream return Audio_CreateStreamedWave( PSkipSoundChars(pName) ); // These are loaded into memory directly return Audio_CreateMemoryWave( PSkipSoundCars(pName) ); }
//----------------------------------------------------------------------------- // Purpose: Simple wrapper to crack naming convention and create the proper wave source // Input : *pName - WAVE filename // Output : CAudioSource //----------------------------------------------------------------------------- CAudioSource *AudioSource_Create( const char *pName ) { if ( !pName ) return NULL; // if ( pName[0] == '!' ) // sentence ; // Names that begin with "*" are streaming. // Skip over the * and create a streamed source if ( pName[0] == '*' ) { return NULL; } // These are loaded into memory directly return Audio_CreateMemoryWave( pName ); }