Table of Contents | ||||||||||
|
||||||||||
AddSFX | ||||||||||
Purpose Adds a sound effect clip to the manager |
||||||||||
Protoype void CSoundMngr::AddSFX (string str_id, string str_filename, int i_vol, int i_priority, int i_pan) |
||||||||||
Parameters
|
||||||||||
Description This function adds a sound clip to the manager. All clips must have a unique ID that will be used to later reference them in the program. You must also specify the name or path of the file that you wish to load into the manager to play. Supported file types: .WAV, .MP2, .MP3, .OGG, .RAW
Audio Settings Each music clip can have it's own unique audio settings for volume, pan, and priority. Volume levels can range from 0-255 (you can also use the predefined values of VOLUME_MIN and VOLUME_MAX, respectively). The priority level of a clip tells the sound engine which clip to bump first when all channels are full. The higher the priority, the less likely the clip will be bumped due to channel overflow. Priorities range from 0-255, with 0 being the lowest and 255 being the highest (you can also use the predefined values of PRIORITY_MIN and PRIORITY_MAX, repsectively). |
||||||||||
Use CSoundMngr sound; sound.AddSFX("my_sfx", "bullet_shot.mp3", VOLUME_MAX*0.5f, 0, PAN_MID); |
||||||||||
|
||||||||||
|