Mount Fuji Engine  0.8b
Data Structures | Enumerations | Functions
Sound System

Data Structures

struct  MFSoundInfo
 Describes an MFSound buffer. More...
 
struct  MFStreamCallbacks
 Stream callbacks. More...
 
struct  MFSound
 Represents a Fuji sound. More...
 
struct  MFVoice
 Represents a playing sound. More...
 
struct  MFAudioStream
 Represents a Fuji audio/music stream. More...
 

Enumerations

enum  MFSoundFlagsInternal { MFSF_Dynamic = MFBIT(0), MFSF_Circular = MFBIT(1), MFSF_ForceInt = 0x7FFFFFFF }
 Sound flags. More...
 
enum  MFPlayFlags {
  MFPF_Looping = MFBIT(0), MFPF_3D = MFBIT(1), MFPF_BeginPaused = MFBIT(2), MFPF_Reserved = 0x7 << 28,
  MFPF_ForceInt = 0x7FFFFFFF
}
 Sound play flags. More...
 
enum  MFAudioStreamFlags { MFASF_QueryLength = MFBIT(0), MFASF_AllowSeeking = MFBIT(1), MFASF_AllowBuffering = MFBIT(2), MFASF_DecodeOnly = MFBIT(3) }
 Stream create flags. More...
 
enum  MFStreamInfoType {
  MFSIT_TrackName, MFSIT_AlbumName, MFSIT_ArtistName, MFSIT_Genre,
  MFSIT_Max, MFSIT_ForceInt = 0x7FFFFFFF
}
 Stream info type. More...
 

Functions

MF_API MFSoundMFSound_Create (const char *pName)
 Load a sound. More...
 
MF_API MFSoundMFSound_CreateDynamic (const char *pName, int numSamples, int numChannels, int bitsPerSample, int samplerate, uint32 flags)
 Create a dynamic sound buffer. More...
 
MF_API int MFSound_Destroy (MFSound *pSound)
 Destroy a sound. More...
 
MF_API MFSoundMFSound_FindSound (const char *pName)
 Find a sound. More...
 
MF_API size_t MFSound_SetBufferData (MFSound *pSound, const void *pData, size_t size)
 Fill a sound buffer with sample data. More...
 
MF_API int MFSound_Lock (MFSound *pSound, size_t offset, size_t bytes, void **ppData, size_t *pSize, void **ppData2=NULL, size_t *pSize2=NULL)
 Lock a sound buffer. More...
 
MF_API void MFSound_Unlock (MFSound *pSound)
 Unlock a sound buffer. More...
 
MF_API MFVoiceMFSound_Play (MFSound *pSound, uint32 playFlags=0)
 Play a sound. More...
 
MF_API void MFSound_Pause (MFVoice *pVoice, bool pause=true)
 Pause a sound. More...
 
MF_API void MFSound_Stop (MFVoice *pVoice)
 Stop a sound. More...
 
MF_API void MFSound_SetListenerPos (const MFMatrix &listenerPos)
 Set the sound listener position. More...
 
MF_API void MFSound_SetVolume (MFVoice *pVoice, float volume)
 Set the volume of a voice. More...
 
MF_API void MFSound_SetPlaybackRate (MFVoice *pVoice, float rate)
 Set the playback rate for a voice. More...
 
MF_API void MFSound_SetPan (MFVoice *pVoice, float pan)
 Set the voices pan. More...
 
MF_API void MFSound_SetPlaybackOffset (MFVoice *pVoice, float seconds)
 Set playback offset. More...
 
MF_API void MFSound_SetMasterVolume (float volume)
 Set the master volume. More...
 
MF_API uint32 MFSound_GetPlayCursor (MFVoice *pVoice, uint32 *pWriteCursor=NULL)
 Get the current play cursor, in samples. More...
 
MF_API MFSoundMFSound_GetSoundFromVoice (MFVoice *pVoice)
 Get the sound buffer from a voice. More...
 
MF_API void MFSound_GetSoundInfo (MFSound *pSound, MFSoundInfo *pInfo)
 Get info about a sound. More...
 
MF_API void MFSound_RegisterStreamHandler (const char *pStreamType, const char *pStreamExtension, MFStreamCallbacks *pCallbacks)
 Register audio stream handler. More...
 
MF_API MFAudioStreamMFSound_CreateStream (const char *pFilename, uint32 flags=0)
 Create audio stream. More...
 
MF_API void MFSound_PlayStream (MFAudioStream *pStream, uint32 playFlags=0)
 Begin stream playback. More...
 
MF_API void MFSound_DestroyStream (MFAudioStream *pStream)
 Destroy a music track. More...
 
MF_API void MFSound_SeekStream (MFAudioStream *pStream, float seconds)
 Seek the stream. More...
 
MF_API void MFSound_PauseStream (MFAudioStream *pStream, bool pause)
 Pause stream playback. More...
 
MF_API MFVoiceMFSound_GetStreamVoice (MFAudioStream *pStream)
 Get the voice associated with an MFAudioStream. More...
 
MF_API const char * MFSound_GetStreamInfo (MFAudioStream *pStream, MFStreamInfoType infoType)
 Get information associated with an audio stream. More...
 
MF_API size_t MFSound_ReadStreamSamples (MFAudioStream *pStream, void *pBuffer, size_t bytes)
 Read sample data from an audio stream. More...
 

Detailed Description