OpenSoundFile
Creates a SoundFilePlayer data structure and loads a sound file.
Synopsis
SoundFilePlayer *OpenSoundFile( char *FileName,int32 NumBuffers, int32 BufSize )
Description
This is a convenience function that creates a SoundFilePlayer data structure and loads the sound file. It calls CreateSoundFilePlayer()
and LoadSoundFile()
for you.
Arguments
- FileName
- A pointer to the name of the sound file.
- NumBuffers
- A value indicating the number of audio data buffers in the SoundFilePlayer.
- BufSize
- A value indicating the size of the audio data buffers.
Return Value
This function returns a pointer to the SoundFilePlayer data structure if successful or NULL if an error occurs.
Implementation
Convenience call implemented in music.lib V20.
Caveats
Buffer size must be a multiple of the file's block size (see LoadSoundFile()
for complete reason).
Associated Files
soundfile.h, music.lib
See Also
CloseSoundFile(), DeleteSoundFilePlayer(), LoadSoundFile(), ReadSoundFile(), RewindSoundFile(), ServiceSoundFile(), StartSoundFile(), StopSoundFile(), UnloadSoundFile() CreateSoundFilePlayer()