Closed GoogleCodeExporter closed 8 years ago
Nevermind, disregard this. After looking into it more. It seems the official
FLAC encoder wasn't encoding the FLAC as 24 bits (even though I explicitly tell
it to). It made a 16bit one.
Original comment by mathew1800
on 9 Aug 2013 at 3:16
I have added 24-bit FLAC support (correctly this time), within the case
statement here:
https://code.google.com/p/practicesharp/source/browse/trunk/NAudioFLAC/Library/F
LACFileReader.cs#214
simply add:
m_NAudioSampleBuffer[m_playbackBufferOffset++] = (byte)((sample >> 0) & 0xFF);
m_NAudioSampleBuffer[m_playbackBufferOffset++] = (byte)((sample >> 8) & 0xFF);
m_NAudioSampleBuffer[m_playbackBufferOffset++] = (byte)((sample >> 16) & 0xFF);
nAudioBufferFull = m_playbackBufferOffset >= m_NAudioSampleBuffer.Length;
and it should be able to read 24-bit FLAC.
Original comment by mathew1800
on 6 Dec 2013 at 12:59
Hi Mathew,
I'll be glad to add your code, but your previous comment from Aug 9, 2013 a bit
confuses me. You wrote that the official FLAC encoder wasn't encoding the FLAC
as 24 bits. Does it encode it now with 24 bits?
Thanks.
Original comment by yuva...@gmail.com
on 6 Dec 2013 at 1:27
I verified this code with this sample file, seems to work great.
http://www.pristineclassical.com/More/FLAC-24bit.html
Original comment by yuva...@gmail.com
on 6 Dec 2013 at 1:32
Code committed: Revision #354
Original comment by yuva...@gmail.com
on 6 Dec 2013 at 1:35
>You wrote that the official FLAC encoder wasn't encoding the FLAC as 24 bits.
Yeah, this was a mistake on my part. I actually don't even know why I had said
it was the official encoder/decoder that did that. I think I actually encoded
them wrong during testing then. Sorry about that.
Original comment by mathew1800
on 6 Dec 2013 at 3:44
Original issue reported on code.google.com by
mathew1800
on 9 Aug 2013 at 2:48