Sound

Connected with the game events systems it deals directly with the OSC server It also provides a phantom layer, which mimics OSC with local BGE sound resources.

class src.sound.AudaspaceSoundEngine(logger)

Bases: src.sound.SoundEngine

class src.sound.AudaspaceSoundObject(engine, kx_object)

Bases: builtins.object

play(sound, loop=False, volume=0.5)

Load and play sound file

class src.sound.Base(parent)

Bases: src.base.Base

setOSCUser(user)

Specify the OSC User to use

setVolumeHigh()

High volume, sonar is on

setVolumeLow()

Low volume, flashlight is on

setVolumeNormal()

Normal volume, initial

class src.sound.Bat(engine, sound_source, force_fallback=False)

Bases: src.sound.Enemy

sound_end = 'bat_end.wav'
sound_init = 'bat.wav'
class src.sound.Enemy(engine, sound_source, sound_init, sound_end, force_fallback)

Bases: builtins.object

audio_folder = '//../audio/'
osc = None
playEnd()

Play sound for when the object ends (e.g., is hit by rock)

playInit()

Play sound for when the object is active (e.g., flying)

sound_end
sound_init
class src.sound.Ghost(engine, sound_source, force_fallback=False)

Bases: src.sound.Enemy

sound_end = 'ghost_end.wav'
sound_init = 'ghost.wav'
class src.sound.OSCSoundEngine(osc, logger)

Bases: src.sound.SoundEngine

getUser()

called from the OSC objects

setUser(user)

called from the processor file

class src.sound.OSCSoundObject(osc, engine, kx_object)

Bases: builtins.object

play(sound, loop=False, volume=0.5)

Load and play sound file

Parameters:sound (str) – The sound file filepath
class src.sound.Pendulum(engine, sound_source, force_fallback=False)

Bases: src.sound.Enemy

sound_end = 'pendulum_end.wav'
sound_init = 'pendulum.wav'
class src.sound.SoundEngine(logger, volumes)

Bases: builtins.object

setVolumeHigh()

Set the highest volume level

setVolumeLow()

Set the lowest volume level

setVolumeNormal()

Set the regular (initial) volume level