Sound::setDefaults

FMOD Studio API

Firelight Technologies FMOD Studio API

Sound::setDefaults

Sets a sounds's default attributes, so when it is played it uses these values without having to specify them later for each channel each time the sound is played.

C++ Syntax

FMOD_RESULT Sound::setDefaults(
  float frequency,
  int priority
);

C Syntax

FMOD_RESULT FMOD_Sound_SetDefaults(
  FMOD_SOUND *sound,
  float frequency,
  int priority
);

C# Syntax

RESULT Sound.setDefaults(
  float frequency,
  int priority
);

JavaScript Syntax

Sound.setDefaults(
  frequency,                       
  priority                         
);

Parameters

frequency
Default playback frequency for the sound, in hz. (ie 44100hz).
priority
Default priority for the sound when played on a channel. 0 to 256. 0 = most important, 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

There are no 'ignore' values for these parameters. Use Sound::getDefaults if you want to change only 1 and leave others unaltered.

See Also




Version 1.10.03 Built on Feb 1, 2018