What is the best way to play music in game.
I was using al_load_sample and it all works fine. but this is slow to load as it all has to be loaded into memory at the start (and will eventually use a lot of memory).
So I tried al_load_audio_stream, which works, but is poorly documented in how to control it.
al_attach_audio_stream_to_mixer(Music, al_get_default_mixer()); The music plays fine.
But now how to stop it, it just keeps adding new music over the old music so I end up with multiple music files playing at once.
Also when it gets to the end of the file, it will no longer play it.
I have dozens of ogg files, that I need to be able to play at random, however when I play a new one, I need the old one to stop, or fade would be better.
The documentation is fine for documenting what each function does, but it dosent give an overview of how to use them all together and what is the correct way to use them.