sound
FreeBodyEngine.audio.sound
#
AudioManager()
#
Bases: Service
Generic engine-facing audio manager.
Contains functionality that is independent of the actual audio backend. Platform-specific implementations inherit from this class.
running = True
instance-attribute
#
sounds = []
instance-attribute
#
volume = 1.0
instance-attribute
#
add_sound(sound)
#
Adds a sound to the currently active sounds.
create_sound(data)
#
Creates a backend-specific Sound.
remove_sound(sound)
#
Removes a sound from the currently active sounds.
set_volume(volume)
#
Sets the master volume.
shutdown()
#
Shuts down the backend.
stop_all()
#
Stops every currently-playing sound.
Sound(manager)
#
Generic engine-facing representation of a sound.
Backend implementations provide the actual decoding and playback.
duration
property
#
Total duration in seconds.
manager = manager
instance-attribute
#
paused = False
instance-attribute
#
position = 0
instance-attribute
#
position_s
property
#
Current playback position in seconds.
start_frame = 0
instance-attribute
#
stopped = True
instance-attribute
#
volume = 1.0
instance-attribute
#
pause()
#
Pauses playback.
play()
#
Starts or resumes playback.
seek(position_s)
#
Seeks to a position in seconds.
set_volume(volume)
#
Sets this sound's volume.
stop()
#
Stops playback and resets position.