Greetings,
I was having trouble loading my OGG files, only to realize that the LoadMusic() command needs to be LoadMusicOGG() instead.
I was thinking that the LoadMusic() would handle MP3s and OGGs.
So, when the OGGs weren't working, I opted for using MP3s which I have always avoided in the past due to the licensing issues they had.
Anyway, I was working on new game that I wanted to give the user control of a play list of songs, and decided to extract that code for use as an example.
So, here is is, but I will be changing this to handle OGGs now that I have realized the proper way to load those in AGK.
Unfortunately though, the LoadMusic() let me loop a list of music IDs and the LoadMusicOGG() will not.
So, this code example will need a major modification to get it to work the same way with the OGGs.
But, I thought that this made be helpful to anyone who is planning on using MP3 files in their projects.
I am sure this is not the cleanest code for an MP3 Player, but at <160 lines it doesn't seem that bad to me.
Anyway, see the attached ZIP, and I hope it helps give some idea...
Edit
Having trouble uploading from this WiFi, so the Zip will be up later when I get it sorted out.
oh well, maybe the ZIP is too large for the forums here (59mb??)
I forget what the limit is, but the app itself is only 6mb, but I included 7 mp3's which made the zip bigger.
i'll try breaking the zip up and see if that it was it is, but you guys will need to put the mp3s back in the media/music folder before trying to run it
so extract each song and place all 7 of them in the music folder (sorry about the file size limit on the zips)
the ZIP extraction will create a folder for each song, but do not put that in the music folder, just the mp3 itself
Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1