Re: Re: Network byte order, NAS plugin

Chris Majewski <[email protected]>
Newsgroups gmane.comp.multimedia.xmms.devel
Message-ID <[email protected]>
OK, thanks. I'll look through the plugin  code and see if I can put in
a htons  or ntohs somewhere.. It's  funny that the  WAV plugin doesn't
give me that behaviour.. I guess  it just reads the bytes off the disk
and passes them directly to the output plugin?? Is there a way to tell
whether the data needs to be byteswapped (so that my hack won't break the
plugin for Linux)? I guess I could do some kind of 

#ifdef LINUX 
        /* swap bytes */
#endif

but isn't that ugly?

-chris

Haavard Kvaalen <[email protected]> writes:

> On 18 Dec 2002, Chris Majewski wrote:
> 
> > This just in: I built the plugin on a linux box and it does the right thing
> > (i.e. plays mp3 files/streams with 16-bit resolution). However, I need
> > it on  a Sun box.  The above suggests  to me that  it could be  a byte
> > order issue. Where can I hack?? 
> 
> I don't know the NAS plugin, but my first guess is that the bug is there.  
> The mp3 plugin will always generate sound in native endianness, and it is
> the output plugin's responsibility to byteswap the data if that is
> necessary.
> 
> -- 
> Håvard Kvålen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.