APIAudioset_sound_volume

set_sound_volume

Sets a sound effect volume from 0 to 1.

Signature

set_sound_volume

Sets a sound effect volume from 0 to 1.

Signature

set_sound_volume(sound: Sound, volume: float) -> None

Parameters

NameTypeDefaultDescription
soundSoundNonesound argument for this API call.
volumefloatNonevolume argument for this API call.

Returns

None

Example

from conjure import *

init_window(360, 640, "Audio")
sound = load_sound("coin.mp3")
if is_key_pressed(KEY_SPACE):
    play_sound(sound)

See also

  • load_sound
  • play_sound
  • stop_sound

Return to the audio overview or continue with the quickstart.