-
Notifications
You must be signed in to change notification settings - Fork 0
Audio Manager
The Audio Manager controls all audio being played, with the music and sound effects separated into two different functionalities. Audio and be run from the UI, in which case the existence of files should be guaranteed, it can also be run from the folder LevelSmithLabs/Audio in the user's roaming appdata. The Manager also handles fallback if said files do not currently exist.
Connecting Systems:
- Control for audio is found in the settings menu
- None
Audio:
- User can place appropriately named audio files into the Audio folder to play custom sound effects/music during testing
- If files don't exist, fallback is handled with default sound effects during gameplay
- Folder can be used to create multiple possible audio sources
- Basic sound effects play during editing
All audio files that can be added by the user: PlayerDeath, PlayerJump, Victory, EnemyDeath, LevelMusic, Walking effect for Ice, Sticky, and Standard tiles, Bounce effect
-
available_players : Array[AudioStreamPlayer]= All AudioStreamPlayers not currently playing audio, new sound effects can be run in these. -
walking_player: AudioStreamPlayer= The AudioStreamPlayer that gets used to play walking sounds whenever the player moves, runs repeatedly as long as the player is walking. -
inuse_players : Array[AudioStreamPlayer]= All AudioStreamPlayers that are currently playing audio, these are stored so volume changes impact currently played effects. -
queue : Array[String]= An array of filepaths with audio to play, can be .mp4 or .wav. -
soundLevels : Dictionary= Contains references to sound effects with different individual volume values. Used more prominently in VolumeSlider branch.
-
func play_(UI_)effect(effectName: String) -> void: Plays a sound effect or UI effect, sound effects get routed through the currently created Audio folder in the user's Roaming directory, UI sound effects are stored in the project. This function adds the effect to the queue to play during the next _process frame a player is available. -
func play_(UI_)music(musicName: String) -> void: Stops the currently played music being held by musicPlayer, starts music at the specified filepath. Filepath handling works the same as play_(UI_)effect. -
func find_audio_in_folder(folderPath: String) -> AudioStream: Takes in the folderPath for a sound effect and reads the file inside of it, if the file is a valid extension, attach it to a new AudioStream and return it to be played within the AssetManager.
Future Work:
- Merge branch for adjusting volume of individual assets into main.
Risks:
- If the user puts in a file that's not .mp3, .wav, .ogg, it won't work.
- None
Resources
Known Issues
Future Work
Globals
Managers
- Main Menu Manager
- Master Manager
- Camera Manager
- Hotkey Manager
- Import Export Manager
- Audio Manager
- Animation Manager
- PopUp Manager
UI
Managers
- Editor Manager
- Tile Manager
- Entity Manager
- Icon Manager
- Preview Manager
- Tool Manager
- Asset Manager
- Custom Cursor Manager
Tiles & Entities
- Grid Lines
- Preview Line
- Tiles & Entities
- Enemies
- Patrolling Enemy
- Flying Enemy
- Shooting Enemy
- Stationary Enemy
- Moving Platform
- Property Editing
Asset Swapping
UI
Managers
Player