digitalmars.D.announce - one-file pure D decoders for vorbis, flac and mp3
- ketmar (11/11) Jun 29 2016 i decided to make some noise about those, as people may thinking
- Guillaume Piolat (2/6) Jun 29 2016 That's pretty cool, thanks!
- Martin Nowak (3/12) Jun 29 2016 Nice, just recently use stb_vorbis.c. Any chance you'll turn this
- ketmar (6/7) Jun 29 2016 zero. i'm not using dub, and i hate dub polluting my source
- Suliman (2/13) Jun 29 2016 What benefits from lib without phobos as dependens?
- deadalnix (5/16) Jun 29 2016 <3
- ketmar (3/6) Jun 29 2016 thank you.
- ketmar (1/1) Jul 01 2016 vorbis decoder synced with current stb version (1.06 -> 1.09)
- sam (6/17) Jul 03 2016 This is great thanks! I was able to use minimp3 with SDL2's
- ketmar (17/20) Jul 04 2016 yep, mp3 detection is very basic. while it *tries* to do some
- Basile B. (3/5) Jul 04 2016 lol, does that sounds like if an hard-knee compressor limits the
- ketmar (2/7) Jul 04 2016 i'd say that it is like compressed industrial death metal.
- ketmar (4/5) Jul 04 2016 pushed small update, it works now. i accidentally forgot to
i decided to make some noise about those, as people may thinking about doing the ports themselves, and effectively double (or triple, or...) the work. so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL. they may or may not work for you, i don't know. [1] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/stb/vorbis.d [2] http://repo.or.cz/iv.d.git/blob/HEAD:/drflac.d [3] http://repo.or.cz/iv.d.git/blob/HEAD:/minimp3.d
Jun 29 2016
On Wednesday, 29 June 2016 at 09:07:18 UTC, ketmar wrote:so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL.That's pretty cool, thanks!
Jun 29 2016
On Wednesday, 29 June 2016 at 09:07:18 UTC, ketmar wrote:i decided to make some noise about those, as people may thinking about doing the ports themselves, and effectively double (or triple, or...) the work. so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL. they may or may not work for you, i don't know. [1] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/stb/vorbis.dNice, just recently use stb_vorbis.c. Any chance you'll turn this into a dub package?
Jun 29 2016
On Wednesday, 29 June 2016 at 10:22:39 UTC, Martin Nowak wrote:Any chance you'll turn this into a dub package?zero. i'm not using dub, and i hate dub polluting my source directory with it's files. but i don't mind if somebody will just fork/take the sources and create dub packages from that (or any other source from IV one is interested in). no need to ask my permissions or something.
Jun 29 2016
On Wednesday, 29 June 2016 at 09:07:18 UTC, ketmar wrote:i decided to make some noise about those, as people may thinking about doing the ports themselves, and effectively double (or triple, or...) the work. so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL. they may or may not work for you, i don't know. [1] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/stb/vorbis.d [2] http://repo.or.cz/iv.d.git/blob/HEAD:/drflac.d [3] http://repo.or.cz/iv.d.git/blob/HEAD:/minimp3.dWhat benefits from lib without phobos as dependens?
Jun 29 2016
On Wednesday, 29 June 2016 at 09:07:18 UTC, ketmar wrote:i decided to make some noise about those, as people may thinking about doing the ports themselves, and effectively double (or triple, or...) the work. so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL. they may or may not work for you, i don't know. [1] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/stb/vorbis.d [2] http://repo.or.cz/iv.d.git/blob/HEAD:/drflac.d [3] http://repo.or.cz/iv.d.git/blob/HEAD:/minimp3.d<3 I did vorbis by myself in the past in java, that format is UUURRRRGHH ! Good work.
Jun 29 2016
On Wednesday, 29 June 2016 at 18:03:50 UTC, deadalnix wrote:I did vorbis by myself in the past in java, that format is UUURRRRGHH !lucky me, Sean did all the hard work. ;-)Good work.thank you.
Jun 29 2016
vorbis decoder synced with current stb version (1.06 -> 1.09)
Jul 01 2016
On Wednesday, 29 June 2016 at 09:07:18 UTC, ketmar wrote:i decided to make some noise about those, as people may thinking about doing the ports themselves, and effectively double (or triple, or...) the work. so, here they are: * Vorbis decoder[1] (stb_vorbis port), PD; * FLAC decoder[2] (drflac port), PD; * MP3 decoder[3] (minimp3 port), GPL. they may or may not work for you, i don't know. [1] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/stb/vorbis.d [2] http://repo.or.cz/iv.d.git/blob/HEAD:/drflac.d [3] http://repo.or.cz/iv.d.git/blob/HEAD:/minimp3.dThis is great thanks! I was able to use minimp3 with SDL2's queueaudio function to play back almost all of the MP3s in my library. But I noticed that any MP3 with embedded album art is reported as invalid by the library. Here's a sample one: https://my.mixtape.moe/cjekko.mp3
Jul 03 2016
On Monday, 4 July 2016 at 05:16:50 UTC, sam wrote:But I noticed that any MP3 with embedded album art is reported as invalid by the library. Here's a sample one: https://my.mixtape.moe/cjekko.mp3yep, mp3 detection is very basic. while it *tries* to do some work on it, you'd better not rely on detection results. for me, test player is happy playing 7-Zip archives as mp3s, for example. ;-) thank you for report. i may do something to improve detection, but to be honest, it is not a priority. such one-file libs are usually used in environments where you know what your files are (like game engines and such). also, please, be aware that you *may* crash libs with malformed input data. while the libs trying their best to not fail, this is, again, not a priority. but still, i'm using my test player to listen my huge vorbis/flac/mp3 collection, and it seems to work most of the time. p.s. i'll take a look at the sample anyway. minimp3 should skip ID3 tags at the start of the file, but i didn't really tested that code.
Jul 04 2016
On Monday, 4 July 2016 at 07:33:19 UTC, ketmar wrote:for me, test player is happy playing 7-Zip archives as mp3s, for example. ;-)lol, does that sounds like if an hard-knee compressor limits the output ?
Jul 04 2016
On Monday, 4 July 2016 at 08:18:29 UTC, Basile B. wrote:On Monday, 4 July 2016 at 07:33:19 UTC, ketmar wrote:i'd say that it is like compressed industrial death metal.for me, test player is happy playing 7-Zip archives as mp3s, for example. ;-)lol, does that sounds like if an hard-knee compressor limits the output ?
Jul 04 2016
On Monday, 4 July 2016 at 05:16:50 UTC, sam wrote:https://my.mixtape.moe/cjekko.mp3pushed small update, it works now. i accidentally forgot to include ID3v2 tag skiping at all, sorry! ;-) thank you for report, feel free to report even more! ;-)
Jul 04 2016
On Monday, 4 July 2016 at 08:01:06 UTC, ketmar wrote:On Monday, 4 July 2016 at 05:16:50 UTC, sam wrote:Wow that was a quick fix. Thanks! The only other problem I found was in order to compile your lib I had to add a cast in two places:https://my.mixtape.moe/cjekko.mp3pushed small update, it works now. i accidentally forgot to include ID3v2 tag skiping at all, sorry! ;-) thank you for report, feel free to report even more! ;-)sblimit = ((ptr - g.sb_hybrid.ptr) / 18) + 1;turned tosblimit = cast(int)(((ptr - g.sb_hybrid.ptr) / 18) + 1);andreturn nb_frames * 32 * uint16_t.sizeof * s.nb_channels;turned toreturn cast(int)(nb_frames * 32 * uint16_t.sizeof * s.nb_channels);This was the only way I could get it to compile on DMD64 D Compiler v2.071.1 / LDC - the LLVM D compiler (1.0.0). There are a lot more errors in the gdc version mainly about pragma. But i'm not using GDC so not too concerned.
Jul 05 2016
On Tuesday, 5 July 2016 at 09:04:38 UTC, sam wrote:This was the only way I could get it to compile on DMD64 D Compiler v2.071.1 / LDC - the LLVM D compiler (1.0.0).yep, i forgot to test it with 64-bit compiler, sorry. i fixed all three decoders now.There are a lot more errors in the gdc version mainly about pragma.yep, `pragma(inline, true);` is not supported by gdc yet. still, i added condition to all pragmas, so it should work with GDC now.
Jul 06 2016