Exemplo n.º 1
0
/*---------------------------------------------------------------------
   Function: FX_PlayAuto3D

   Play a positioned sound, autodetecting the format.
---------------------------------------------------------------------*/
int FX_PlayAuto3D( char *ptr, unsigned int length, int pitchoffset, int angle,
                   int distance, int priority, unsigned int callbackval )
{
    int handle = -1;

    if (!memcmp("Creative Voice File\x1a", ptr, 20)) {
        handle = MV_PlayVOC3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
    } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) {
        handle = MV_PlayWAV3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
#ifdef HAVE_VORBIS
    } else if (!memcmp("OggS", ptr, 4)) {
        handle = MV_PlayVorbis3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
#endif
    }

    if ( handle < MV_Ok )
    {
        FX_SetErrorCode( FX_MultiVocError );
        handle = FX_Warning;
    }

    return handle;
}
Exemplo n.º 2
0
int FX_PlayVOC3D
   (
   char *ptr,
   int pitchoffset,
   int angle,
   int distance,
   int priority,
   unsigned long callbackval
   )

   {
   int handle;

   handle = MV_PlayVOC3D( ptr, pitchoffset, angle, distance,
      priority, callbackval );
   if ( handle < MV_Ok )
      {
      FX_SetErrorCode( FX_MultiVocError );
      handle = FX_Warning;
      }

   return( handle );
   }
Exemplo n.º 3
0
int FX_PlayVOC3D
   (
   uint8_t *ptr,
   int32_t pitchoffset,
   int32_t angle,
   int32_t distance,
   int32_t priority,
   uint32_t callbackval
   )

   {
   int handle;

   handle = MV_PlayVOC3D( ptr, pitchoffset, angle, distance,
      priority, callbackval );
   if ( handle < MV_Ok )
      {
      FX_SetErrorCode( FX_MultiVocError );
      handle = FX_Warning;
      }

   return( handle );
   }