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.

I thought the pcm_convert.c does not handle Xbit to 8bit or 8bit to Xbit
conversions.

I think currently it supports all available PCM formats from mpd,
channels 1-N
sample_bits 8,16,24,32
framerate 1-M
so therefor it returns always true

http://git.musicpd.org/cgit/metyl/mpd.git/

metyl

On Tue, Nov 10, 2009 at 6:35 PM, Max Kellermann <m...@duempel.org> wrote:

> On 2009/11/10 19:22, Metyl Methylius <the.me...@gmail.com> wrote:
> > I think WAVe was designed by Micro$oft runining Intel and there is no way
> to
> > support other little endian.
> > I made convesions (glib based) from all possible sample_bits (8/16/24/32)
> > but i've tested only on little endian architecture.
>
> Your pcm24_to_wave() function is wrong; drop the GUINT32_TO_LE() call!
>
> On big endian, "value & 0xff" will give you the most significant byte,
> because the byte order was reversed by GUINT32_TO_LE().  Since you're
> picking byte by byte anyway, you don't need GUINT32_TO_LE().
>
> > Anyway 16bit downto 8bit conversion isn't implemented so I haven't tested
> > this but its trivial case.
>
> What do you mean?
>
> Btw. if your open() method gets an unsupported audio format, the
> encoder plugin may modify the audio_format object.  MPD will convert
> automatically then.  Just in case that helps you..
>



-- 
This mess was sent using 100% recycled electrons. If you want to get rid of
this mess just turn off your computer,
------------------------------------------------------------------------------
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

Reply via email to