audio: refactor audio asset loading, add crit sound #9
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NotAShelf/rogged!9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "amr/rogged:audio"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created AudioAssets struct to hold the loaded sounds. It's part of the GameState to make it easy to access everywhere. If this is bad it can be refactored fairly easily.
@ -95,3 +94,3 @@void audio_play_item_pickup(void) {void audio_play_item_pickup(GameState *gs) {// High-pitched pickup soundplay_tone(800.0f, 0.15f, 0.4f);Is the double sound playback intentional?
This plays both a procedural
play_tone()and the loadedgs->sounds.pickup, simultaneously. Other refactored functions (audio_play_attack,audio_play_dodge) replaced procedural tones entirely with loaded sounds.Oh, no, meant to remove that play_tone. Though it's not actually working anyway. But yeah I'll nix that.