Channel::setPriority

FMOD Studio API

Firelight Technologies FMOD Studio API

Channel::setPriority

Sets the priority for the channel after it has been played.

C++ Syntax

FMOD_RESULT Channel::setPriority(
  int priority
);

C Syntax

FMOD_RESULT FMOD_Channel_SetPriority(
  FMOD_CHANNEL *channel,
  int priority
);

C# Syntax

RESULT Channel.setPriority(
  int priority
);

JavaScript Syntax

Channel.setPriority(
  priority                         
);

Parameters

priority
Priority for the channel, from 0 (most important) to 256 (least important), default = 128.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

When more channels than available are played the virtual channel system will choose existing channels to steal. Lower priority sounds will always be stolen before higher priority sounds. For channels of equal priority, that with the quietest ChannelControl::getAudibility value will be stolen.

See Also




Version 1.10.03 Built on Feb 1, 2018