Table of Contents

 
SetPriority
 

Purpose

Sets the priority level of a clip

 

Protoype

void CSoundMngr::SetPriority (string str_id, int i_priority)
 

Parameters

id the ID of the sound object to set
priority the new clip priority level
 

Description

This function sets a new clip priority level. 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)

NOTE: This is a channel function, which means it can be used for both music and sfx objects. The function itself will handle distinguishing between the two.

 

Use

CSoundMngr sound;
sound.SetPriority("my_sound", 5);
 

Prev: SetPan