Open aod6060 opened 1 month ago
Finally I'm going to get started on this issue... Yes something that has nothing to do with the render.
Alright I've added a bunch of stuff to the sound api. I'm going in a different direction from the initial commit. Instead of a pure function api I've decided to add in structures that will help with using the sound api. They are
All three of them wrap up apart of the api. SoundFXPlayer2D will handle 2D positional sound in the engine.
I ran into an interesting issue. However, I have fixed which requred me to remove "SoundFXPlayer2D" from the project. Basically if I played the regular SoundFXPlayer it would try to to detect isPlaying in the SoundFXPlayer2D class and would do change the direction of the regular sound player. The fixed will be determined during the time of play.
Alright I'm currently done with with the sound system. Its pretty much functional now. If I need to add something to I'll do that at a later date. Also I'm going to get started on a "sound_demo" which will show off the sound system.
If Graphic gives game atmosphere then sound give it ambient. This will be next system after that I'll be working on after the render is almost done. This will be an interesting one because I want to try and implement normal audio and 2D positioning audio without using something like OpenAL but SDL_mixer. It should be a fun challenge. There are 2 particular function which they are.
From looking at the documentation it looks like the only one I'll need is Mix_SetPosition, however, I'm adding in panning to play it safe. However, if the audio system is set to mono then these to function are foobar. If this doesn't work I might have to look at using openal with mp3/ogg files.