UseMP3SoundDecoder()
UseMP3SoundDecoder()
Title pretty much sums this one up, I'd like an audio decoder for MP3, similar to OGG and FLAC.
Re: UseMP3SoundDecoder()
+1 I think miniaudio supports mp3 so shouldn't be a biggy
Re: UseMP3SoundDecoder()
I don't know if you know, that ...
you can use the movie library to play mp3.
Use the example of the movie library and choose a mp3 file.
you can use the movie library to play mp3.
Use the example of the movie library and choose a mp3 file.
-
- Enthusiast
- Posts: 796
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: UseMP3SoundDecoder()
+1
Would be great to have this one. @infratec: A few years ago I coded my own music player. With the movie library you have to check for MP3, FLAC or OGG for every file and use the appropriate command. UseMP3SoundDecoder() would have some advantages in this field
Would be great to have this one. @infratec: A few years ago I coded my own music player. With the movie library you have to check for MP3, FLAC or OGG for every file and use the appropriate command. UseMP3SoundDecoder() would have some advantages in this field

Last edited by jamirokwai on Mon Apr 28, 2025 3:25 pm, edited 1 time in total.
Regards,
JamiroKwai
JamiroKwai
Re: UseMP3SoundDecoder()
infratec wrote: Mon Apr 28, 2025 12:08 pm I don't know if you know, that ...
you can use the movie library to play mp3.
Use the example of the movie library and choose a mp3 file.
That is hellarious, thanks for sharing! I did not know that. native MP3 decoder command would still be much nicer

Re: UseMP3SoundDecoder()
+1
There was a problem with Miniaudio's auto-codec selection when mp3 was enabled that made file loading slower.
GitHub issue
But this might have been fixed since.
There was a problem with Miniaudio's auto-codec selection when mp3 was enabled that made file loading slower.
GitHub issue
But this might have been fixed since.
- NicTheQuick
- Addict
- Posts: 1503
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: UseMP3SoundDecoder()
I don't think this will ever happen because MP3 decoder/encoder has a proprietary license and I don't think Fantaisie Software will pay for that to be included in the Purebasic installation.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: UseMP3SoundDecoder()
NicTheQuick wrote: Tue Apr 29, 2025 10:25 amI don't think this will ever happen because MP3 decoder/encoder has a proprietary license and I don't think Fantaisie Software will pay for that to be included in the Purebasic installation.
https://en.wikipedia.org/wiki/MP3 wrote:The basic MP3 decoding and encoding technology is patent-free in the European Union, all patents having expired there by 2012 at the latest. In the United States, the technology became substantially patent-free on 16 April 2017 (see below). MP3 patents expired in the US between 2007 and 2017.
Re: UseMP3SoundDecoder()
But the Movie lib is native. Why add another library that does the same thing?
- NicTheQuick
- Addict
- Posts: 1503
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: UseMP3SoundDecoder()
Thank you. Now I realize again how old I am.Shardik wrote: Tue Apr 29, 2025 10:58 amhttps://en.wikipedia.org/wiki/MP3 wrote:The basic MP3 decoding and encoding technology is patent-free in the European Union, all patents having expired there by 2012 at the latest. In the United States, the technology became substantially patent-free on 16 April 2017 (see below). MP3 patents expired in the US between 2007 and 2017.

The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
-
- Enthusiast
- Posts: 796
- Joined: Tue May 20, 2008 2:12 am
- Location: Cologne, Germany
- Contact:
Re: UseMP3SoundDecoder()
MP3-decoding is already a part of Miniaudio. I think, Purebasic should have separate libs for movies and audio. Playing mp3 with the movie library is more like a workaround... On MacOS, my player also plays aac and such, but that should be implemented into the audio-library as well.
Regards,
JamiroKwai
JamiroKwai
Re: UseMP3SoundDecoder()
Situation: I'm building a media player. I want it to be able to play all the formats PB supports, so I go and look at the sound documentation. Wav, ogg, and flac. Cool. Little do I know that I secretly can play MP3, with a library that I'm entirely uninterested in for my application.
MP3 playing belongs in the sound library IMO, especially because I'm pretty sure miniaudio offers this, although the dr_mp3 decoder is slightly weird from what I recall.