Re: [ecasound] Problems with 24/96 over stdin

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Apr 19 2009 - 16:11:02 EEST


On Sat, 18 Apr 2009, kls.schlz@email-addr-hidden wrote:

> Music Player daemon (the current git revision) allows to pipe a stream

(totally unrelated, but just my ++votes for MPD... a great app!)

> Routing 24/96 into aplay works.
> This could mean that I have an issue on the ecsound side.

Let's see...

> NOK: (output is heavy noise)
> | ecasound -q -f:s24_le,2,96000,i -b:64 -i:stdin -o:alsaplugin,0,0 2>/dev/null
> aplay:
> OK:
> aplay -t raw -D plughw:0,0 -f S24_LE -c 2 -r 96000 2>/dev/null

ok, this one is fairly straightforward. The correct ecasound syntax is:

| ecasound -q -f:s32_le,2,96000,i -b:64 -i:stdin -o:alsaplugin,0,0 2>/dev/null

..i.e. s/-f:s24_le/-f:s32_le/

There are two common ways to encode 24bit samples. First is to use 32bit
samples, with the least significant 8bits padded to zero. This encoding is
more appropriate for processing audio, and it's commonly used e.g. when
interfacing with soundcards, and for instance ALSA's 'S24_LE' refers to
this encoding. Ecasound treats these samples simply as normal 32bit
samples (and thus the above syntax). The second encoding is to use 24bits
for each sample with no padding. In ALSA this is 'S24_3LE', while in
ecasound this is 's24_le'. The second option fits better for storage
purposes (e.g. for audio files --> why waste 25% of storage space for
zero padding).

Now in your case, mpd outputs 24bit samples with 32bit encoding, so the
correct format is 's32_le' for ecasound, and 'S24_LE' for aplay.

Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32.
Ecasound-list mailing list
Received on Sun Apr 19 16:15:02 2009

This archive was generated by hypermail 2.1.8 : Sun Apr 19 2009 - 16:15:03 EEST