MusSetMasterVolume()

Syntax

void MusSetMasterVolume(unsigned long flags, int volume);

Arguments

flags
sound source type
volume
the master volume level

Description

It sets the master volume level for all sound generated by the specified type This function allows the programmer to define the master volume levels for songs and sound effects.

The flag argument must contain MUSFLAG_SONGS, MUSFLAG_EFFECTS, or both OR'ed together.

The volume value should be within the range 0 to 0x7FFF (32767).

Return Value

None

Example

void SetOptionsSfx(int value)
{
  MusSetMasterVolume(MUSFLAGS_EFFECTS, (value*0x1000)+0xfff);
}

void SetOptionsMusic(int value)
{
  MusSetMasterVolume(MUSFLAGS_SONGS, (value*0x1000)+0xfff);
}