Added abstraction for 3D and 2D audio. Audio should now be set up using the Sound and LoopingSound classes. I decided to make two classes because there I can only think of two times you would want audio: an environmental sound effect or background music/ambiance. The Sound class holds a sound loaded from a file, the sound can be adjusted with its methods and "fired" so you can forget about it and it will play until the end. The LoopingAudio class has more methods that can adjust the sound while it's playing. All instances of LoopingAudio should be stored so the sound can be paused.
Each class has methods that can set the 3D position of the audio depending on the observer's position and facing direction
In case there is any curiosity, the problem with the sound was resolved by keeping a list of the sound handles and only deleting them after they stop playing.
Added abstraction for 3D and 2D audio. Audio should now be set up using the Sound and LoopingSound classes. I decided to make two classes because there I can only think of two times you would want audio: an environmental sound effect or background music/ambiance. The Sound class holds a sound loaded from a file, the sound can be adjusted with its methods and "fired" so you can forget about it and it will play until the end. The LoopingAudio class has more methods that can adjust the sound while it's playing. All instances of LoopingAudio should be stored so the sound can be paused.