Re: one-file pure D decoders for vorbis, flac and mp3

2016-07-05 Thread sam via Digitalmars-d-announce

On Monday, 4 July 2016 at 08:01:06 UTC, ketmar wrote:

On Monday, 4 July 2016 at 05:16:50 UTC, sam wrote:

https://my.mixtape.moe/cjekko.mp3


pushed 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! ;-)


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:



sblimit = ((ptr - g.sb_hybrid.ptr) / 18) + 1;


turned to


sblimit = cast(int)(((ptr - g.sb_hybrid.ptr) / 18) + 1);


and


return nb_frames * 32 * uint16_t.sizeof * s.nb_channels;


turned to

return 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.


Re: one-file pure D decoders for vorbis, flac and mp3

2016-07-03 Thread sam via Digitalmars-d-announce

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


This 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