sound¶
Play sound effects.
- class pyskool.sound.Beeper(sounds_dir, config)¶
The maker of sound effects.
- Parameters:
sounds_dir – The path to the sounds directory.
config (dict) – Configuration parameters from the ini file.
- add_sound(sound_id, sound_file)¶
Add a sound effect to the beeper’s collection.
- Parameters:
sound_id – The ID of the sound effect.
sound_file – The file name of the sound effect (relative to the sounds directory).
- make_sitting_sound(mode)¶
Play a sitting sound effect. This will be a walking sound effect, chosen at random from those available.
- Parameters:
mode – The mode in which to play the sound effect (see
play()).
- make_walking_sound(index, mode)¶
Play a walking sound effect.
- Parameters:
index – The index of the walking sound effect.
mode – The mode in which to play the sound effect (see
play()).
- pause()¶
Pause the playing of any sound effect.
- play(sound_id, mode=1)¶
Play a sound effect.
- Parameters:
- restore(sounds_dir)¶
Perform tasks required immediately after loading a saved game.
- Parameters:
sounds_dir – The path to the sounds directory.
- unpause()¶
Resume the playing of any sound effect.
- pyskool.sound.ALARM = 'ALARM'¶
ID of the sound effect to play when Albert tells Mr Wacker that Eric is escaping.
- pyskool.sound.ALL_SHIELDS = 'ALL_SHIELDS'¶
ID of the sound effect to play when all the shields have been flashed.
- pyskool.sound.ASYNC = 2¶
Sound effect play mode: asynchronous.
- pyskool.sound.BELL = 'BELL'¶
ID of the sound effect for the bell.
- pyskool.sound.BIKE = 'BIKE'¶
ID of the sound effect to play when the bike is unchained.
- pyskool.sound.CATAPULT = 'CATAPULT'¶
ID of the sound effect to play when Eric’s catapult is fired.
- pyskool.sound.CONKER = 'CONKER'¶
ID of the sound effect to play when Albert is knocked unconscious by the conker.
- pyskool.sound.DESK = 'DESK'¶
ID of the sound effect to play when Eric finds something in a desk.
- pyskool.sound.FROG = 'FROG'¶
ID of the sound effect to play when Eric catches the frog or places it in a cup.
- pyskool.sound.HIT_SOUNDS = ('HIT0', 'HIT1')¶
Hitting sound effect IDs.
- pyskool.sound.JUMP = 'JUMP'¶
ID of the sound effect to play when Eric jumps.
- pyskool.sound.KISS = 'KISS'¶
ID of the sound effect to play when Eric kisses someone.
- pyskool.sound.KNOCKED_OUT = 'KNOCKED_OUT'¶
ID of the sound effect to play when Eric is knocked over.
- pyskool.sound.LINES1 = 'LINES1'¶
ID of lines sound effect 1.
- pyskool.sound.LINES2 = 'LINES2'¶
ID of lines sound effect 2.
- pyskool.sound.MOUSE = 'MOUSE'¶
ID of the sound effect to play when a mouse is caught.
- pyskool.sound.OPEN_SAFE = 'OPEN_SAFE'¶
ID of the sound effect to play when the safe is opened (with the combination).
- pyskool.sound.SAFE_KEY = 'SAFE_KEY'¶
ID of the sound effect to play when Eric gets the safe key.
- pyskool.sound.SHERRY = 'SHERRY'¶
ID of the sound effect to play when Eric fills the water pistol with sherry.
- pyskool.sound.SHIELD = 'SHIELD'¶
ID of the sound effect to play when a shield is hit.
- pyskool.sound.STOREROOM_KEY = 'STOREROOM_KEY'¶
ID of the sound effect to play when Eric gets the storeroom key.
- pyskool.sound.SUSPEND = 1¶
Sound effect play mode: suspend character movement and screen updates.
- pyskool.sound.TUNE = 'TUNE'¶
ID of the opening tune.
- pyskool.sound.UP_A_YEAR = 'UP_A_YEAR'¶
ID of the sound effect to play when Eric goes up a year.
- pyskool.sound.WALK_SOUNDS = ('WALK0', 'WALK1', 'WALK2', 'WALK3')¶
Walking sound effect IDs.
- pyskool.sound.WATER_PISTOL = 'WATER_PISTOL'¶
ID of the sound effect to play when Eric’s water pistol is fired.