Loads a MOD music.
HMUSIC WINAPI BASS_MusicLoad( |
Parameters
mem | TRUE = load the MOD music from memory. | ||||||||||||||||
file | Filename (mem = FALSE) or a memory location (mem = TRUE). | ||||||||||||||||
offset | File offset to load the MOD music from (only used if mem = FALSE). | ||||||||||||||||
length | Data length (only used if mem = FALSE)... 0 = use all data up to the end of file. If length over-runs the end of the file, it'll automatically be lowered to the end of the file. | ||||||||||||||||
flags | A combination of these flags.
|
Return value
If successful, the loaded music's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
BASS_ERROR_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_FILEOPEN | The file could not be opened. |
BASS_ERROR_FORMAT | The file's format is not recognised/supported. |
BASS_ERROR_MEM | There is insufficent memory. |
BASS_ERROR_NO3D | Couldn't initialize 3D support. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
BASS uses the XMPlay engine for it's MOD music support, giving the most accurate reproduction of XM / IT / MOD / S3M / MTM files available from any sound system. The samples are interpolated during mixing for a superior sound quality.
Ramping doesn't take a lot of extra processing and improves the sound quality by removing "clicks". Sensitive ramping leaves sharp attacked samples, while normal ramping can cause them to lose a bit of their impact. Generally, normal ramping is recommended for XMs, and sensitive ramping for the other formats. But, some XMs may also sound better using sensitive ramping.
When loading a MOD music from memory, BASS does not use the memory after it's loaded the MOD music. So you can do whatever you want with the memory after calling this function.
See also
BASS_ChannelSet3DAttributes, BASS_ChannelSet3DPosition, BASS_ChannelSetAttributes, BASS_ChannelSetSync, BASS_ChannelSetEAXMix, BASS_MusicFree, BASS_MusicGetLength, BASS_MusicGetName, BASS_MusicPlay, BASS_MusicPlayEx, BASS_MusicSetAmplify, BASS_MusicSetPanSep, BASS_MusicSetPositionScaler