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

From: <kls.schlz@email-addr-hidden>
Date: Sun Apr 19 2009 - 19:24:08 EEST

Hi there.

Thx for your explanation. Now I understand - at least partially.

BUT: How do I get rid of the 8 extra bits when sending the stream to my 24
bit sound card? Currently it seems I have an 8bit attentuation ongoing.
I tried:

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

This didn't work.


On Apr 19, 2009 3:11pm, Kai Vehmanen <kvehmanen@email-addr-hidden> wrote:
> Hi,

> 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

> 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 eg 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 (eg 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 20:15:03 2009

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