int FX_PlayVOC ( char *ptr, unsigned int ptrlength, int pitchoffset, int vol, int left, int right, int priority, unsigned int callbackval ) { int handle; handle = MV_PlayVOC( ptr, ptrlength, pitchoffset, vol, left, right, priority, callbackval ); if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return( handle ); }
/*--------------------------------------------------------------------- Function: FX_PlayAuto Play a sound, autodetecting the format. ---------------------------------------------------------------------*/ int FX_PlayAuto( char *ptr, unsigned int length, 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_PlayVOC(ptr, length, pitchoffset, vol, left, right, priority, callbackval); } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) { handle = MV_PlayWAV(ptr, length, pitchoffset, vol, left, right, priority, callbackval); #ifdef HAVE_VORBIS } else if (!memcmp("OggS", ptr, 4)) { handle = MV_PlayVorbis(ptr, length, pitchoffset, vol, left, right, priority, callbackval); #endif } if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return handle; }
int FX_PlayVOC ( uint8_t *ptr, int pitchoffset, int vol, int left, int right, int priority, uint32_t callbackval ) { int handle; handle = MV_PlayVOC( ptr, pitchoffset, vol, left, right, priority, callbackval ); if ( handle < MV_Ok ) { FX_SetErrorCode( FX_MultiVocError ); handle = FX_Warning; } return( handle ); }