[Top][All Lists]

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

Re: [Gap-dev-discuss] Cynthiune on Linux/ppc

From: Riccardo Mottola
Subject: Re: [Gap-dev-discuss] Cynthiune on Linux/ppc
Date: Sat, 12 May 2012 15:01:37 +0200
User-agent: Mozilla/5.0 (X11; Linux ppc; rv:10.0.4) Gecko/20120427 Firefox/10.0.4 Iceape/2.7.4


Alsa backend.

I confirm that I can play MP3 files on ppc, but WAV file sound garbage.

If I play this file I get garbage (alsa in LE mode)
Record Take 20.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

However if I set Alsa in BE mode, it plays fine. It appears thus that the WAV library returns the stream in the correct endianness of the computer, while the MP3 library returns it alwas little endian.

Checking in the alsa header one can set LE, BE or not specified. Not specified is then the correct endianness of the computer.

Furthermore if I play this file,
Windows XP Ding.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz
I get:
ALSA lib pcm.c:7482:(snd_pcm_set_params) Unable to get period size for PLAYBACK: Invalid argument

Thus it appears that to make this thing portable the media type needs to set endianness and playrate in the backend.

The OSS backend suffers similar problems, it is set to LE at the moment it appears.

The AO backend plays instead only WAV files so it is set to big-endian..


Riccardo Mottola wrote:
Should we add a -dataEndianness method to the Format protocol ?
I still don't know if it is file-format dependent or not, it depends
how the libraries handle it
Maybe inspection of other players is in order ?

Checking other code on the network, I found that while our backend initialized the backend to 16bit PCM, others initialize it as 16bit LittleEndian PCM. By reading around, this appears to be a sound-specific setting and not a hardware specific setting. Thus more than a configure script, we should have an endianness property for the media type. However, the library used for reading the media might already do a conversion, however since we decode one file type always with the same library, it still would work. I tried it only with MP3 files, I will try other files like WAV. I commited the change to little-endian since I think it is the safer bet (I guess that o n x86 my change has no effect) please try.


reply via email to

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