[Top][All Lists]

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

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

From: Riccardo Mottola
Subject: Re: [Gap-dev-discuss] Cynthiune: song inspector without title bar
Date: Sat, 05 May 2012 15:08:17 +0200
User-agent: Mozilla/5.0 (X11; FreeBSD i386; rv:12.0) Gecko/20120430 Firefox/12.0 SeaMonkey/2.9


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.


Sebastian Reitenbach wrote:

I was able to fix the problem for the Sndio Output Bundle. I remembered the 
manual page:

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 @@
    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.


reply via email to

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