gap-dev-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gap-dev-discuss] Cynthiune: song inspector without title bar


From: Sebastian Reitenbach
Subject: Re: [Gap-dev-discuss] Cynthiune: song inspector without title bar
Date: Sat, 05 May 2012 15:25:36 +0200
User-agent: SOGoMail 1.3.14

 
On Saturday, May 5, 2012 15:08 CEST, Riccardo Mottola <address@hidden> wrote: 
 
> Hi,
> 
> you mean that you need to "force" the output to be always little endian 
> because that is what comes from the file played? Perhaps the files (or 
> only certain files) have an endianness tag and/or know format?
> For example AIFF files are usually  big endian or, on modern macs, 
> little-endian (AIFF/SWOT). I wonder how this is handled by audiofile.
> WAV is known to be LE (RIFF)
> 
> MP3 I don't know. Of ocurse, the library might already compensate that. 
> I never tackled audio programming.
> 
> If you are confident that you need to set always "LE", then commit the 
> patch and we shall look at the ALSA and AO backends.

I already committed it for Sndio and AO, but I only tested FLAC and MP3
so far. I'll do more tests. When I run into trouble, I'll back it out.

Sebastian

> 
> Riccardo
> 
> 
> Sebastian Reitenbach wrote:
> >
> > I was able to fix the problem for the Sndio Output Bundle. I remembered the 
> > manual page:
> >
> > http://www.openbsd.org/cgi-bin/man.cgi?query=sio_open&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
> >
> > The struct sio_par has a parameter le, which defines the Endianess. Setting 
> > this
> > parameter to LE, makes the sound work again for me on i386 and on macppc.
> >
> > A patch would look liek this:
> >
> > Index: Sndio.m
> > ===================================================================
> > RCS file: /sources/gap/gap/user-apps/Cynthiune/Bundles/Sndio/Sndio.m,v
> > retrieving revision 1.2
> > diff -u -r1.2 Sndio.m
> > --- Sndio.m 1 May 2012 12:44:46 -0000       1.2
> > +++ Sndio.m 5 May 2012 11:01:00 -0000
> > @@ -108,6 +108,7 @@
> >     sio_initpar(&par);
> >     par.pchan = numberOfChannels;
> >     par.rate = sampleRate;
> > +  par.le = 1;
> >
> >     if (sio_setpar(hdl,&par))
> >       {
> >
> >
> > Don't know whether other output libraries have the same functionality
> > to force it to little endian.
> >
> > Sebastian
> >
> >>
 
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]