On 2009/11/10 20:06, Metyl Methylius <the.me...@gmail.com> wrote: > why pcm24_to_wave its wrong ? it's maybe not effective but should not be > wrong > it works for little endian and GUINT32_TO_LE() helps to use same masks as > with little endian. > As you pointed its very ineffective and i have rewritten it.
That's still wrong. On little endian, GUINT32_TO_LE() is a no-op. That's why it worked on little-endian. Your new big-endian code: + *dst8++ = (value >> 24) & 0xFF; + *dst8++ = (value >> 16) & 0xFF; + *dst8++ = (value >> 8) & 0xFF; Basically, this code writes a big-endian 24 bit integer into the file (most significant byte first). But you told me today that you have to use little-endian for the WAV on-disk format. (btw. the "& 0xFF" is redundant) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team