SetSampleVolume /Audio and multimedia

bool SetSampleVolume(string fileName, float volume)

Sets the sample volume.

  • 0.0f completely silent
  • 1.0f full sample volume

Example:

void boom(float volume)
{
    SetSampleVolume("soundfx/explosion.mp3", volume);
    PlaySample("soundfx/explosion.mp3");
}