oh my god ive had this one weird awful audio bug in fighting game engine for ages and i only JUST figured out what it was.
there's a sound scheduling system that handles playing sounds in the future and the past and sounds that are actively playing are tracked in a dictionary that has a ClipID for the key, and the status of the sound as the value (basically just says if it was played before or after a time that could be rolled back to, or if a rollback happened and determined that the sound shouldn't have been played)
the ERROR i was getting was a collision with the keys in this dictionary. a ClipID is a super light struct with just the ID of the entity playing the sound, the frame that the sound should have started, and a reference to the sound object itself. i couldn't for the life of me find out how the collision was happening, especially after seeing that it was only trying to play the sound once
ya wanna what it was? nowhere was i clearing the dictionary :) :) :) which means that i'd only run into this issue if the same entity tried to play the same sound on the same simulation frame as in a previous game during the same play session :) this could have gone unnoticed for years if i shipped it and never done the repetitive testing i was doing for health bar UI stuff. W H U G
silly mistake anyways now i'm clearing it lmao
