/*--------------------------------------------------------------------- Function: FX_PlayLoopedAuto Play a looped sound, autodetecting the format. ---------------------------------------------------------------------*/ int FX_PlayLoopedAuto( char *ptr, unsigned int length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, unsigned int callbackval ) { int handle = -1; if (!memcmp("Creative Voice File\x1a", ptr, 20)) { handle = MV_PlayLoopedVOC(ptr, length, loopstart, loopend, pitchoffset, vol, left, right, priority, callbackval); } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) { handle = MV_PlayLoopedWAV(ptr, length, loopstart, loopend, pitchoffset, vol, left, right, priority, callbackval); #ifdef HAVE_VORBIS } else if (!memcmp("OggS", ptr, 4)) { handle = MV_PlayLoopedVorbis(ptr, length, loopstart, loopend, pitchoffset, vol, left, right, priority, callbackval); #endif } if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return handle; }
int FX_PlayLoopedVOC ( char *ptr, long loopstart, long loopend, int pitchoffset, int vol, int left, int right, int priority, unsigned long callbackval ) { int handle; handle = MV_PlayLoopedVOC( ptr, loopstart, loopend, pitchoffset, vol, left, right, priority, callbackval ); if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return( handle ); }
int FX_PlayLoopedVOC ( uint8_t *ptr, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval ) { int handle; handle = MV_PlayLoopedVOC( ptr, loopstart, loopend, pitchoffset, vol, left, right, priority, callbackval ); if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return( handle ); }