Welcome! Log In Create A New Profile

Advanced

Any examples on how to stream mp3/ogg files?

Posted by TheCodingBrony 
Any examples on how to stream mp3/ogg files?
June 19, 2014 12:18AM
I've been searching all over the place trying to find an example on how to play mp3/ogg files without having to load such files entirely into memory (in other words, streaming) as I find that method kind of wasteful.

There is this MP3Player_PlayFile() function in the mp3player library but I cannot find any examples or documentation on how to use it. Not sure if the same can be done with ogg files.
Re: Any examples on how to stream mp3/ogg files?
June 19, 2014 01:55PM
There are modplay, mp3player and oggplayer examples installed with devkitpro.
Re: Any examples on how to stream mp3/ogg files?
June 19, 2014 03:13PM
I already know about those examples but those only demonstrate playing mp3/ogg files that are loaded entirely into memory which is not what I'm looking for (its kind of wasteful). I'm looking for an example that plays a music file through 'streaming' where the player constantly loads bits of the music file being played during playback, hence the term and its great since it doesn't take up a lot of memory.

If there's no such example, a detailed description of the MP3Player_PlayFile() function is good enough.
Re: Any examples on how to stream mp3/ogg files?
June 19, 2014 03:43PM
The ogg example shows how the file is read into memory as needed, so it's trivial to modify it for streaming from memory.
If you want to know how MP3Player_PlayFile() works, read the source code for it.
Sorry, only registered users may post in this forum.

Click here to login