Re: [ecasound] ecasound and PulseAudio problems

From: Lindsay Haisley <fmouse@email-addr-hidden>
Date: Fri Jul 01 2011 - 20:44:05 EEST

On Fri, 2011-07-01 at 09:33 +0200, Julien Claassen wrote:
> Morning Lindsay1
> when I said, I'm not a GUI-user I meant, I have no need of PA and thus
> steered clear of it.

Probably a wise move.

> As to its projuect state I'm not sure, but I've used ALSA
> for 11 years now and it has behaved nicely ever since 2002/2003.

I wear many hats. I didn't have time to delve deeply in the the corners
of ALSA, and the documentation was abysmal. I, too, have made it work.
It seems to be better now.

> As for JACK: See it not as a workaround, but as discoveringsomething, which
> may be very helpful to you.

Absolutely! It solved a problem, though.

> I don't know what type of music you make, but
> maybe you could benefit from a software synthesier/sampler loading sme big
> sampled real instruments or creating weird sound textures?

I'm primarily into quality acoustic music. See
<>. Quality recording and access to basic
recording and digital file tools - normalizing, equalizing, ripping,
encoding (in various formats), extracting audio streams to file, etc.
I've played with more modern, experimental stuff, such as sampling, and
like doing it, but I'm still focused primarily on more "traditional"
recording skills, if you can call anything in the digital audio realm
"traditional" :-)

> OK, did you see, that I specified the resample object in the example
> ecasound commandline? Use it! :-)

There's apparently a header on the file involved and ecasound won't
recignize a resample, as per the man page extract below. The file
ghostriders.mp3 is sampled at 22050, so I insert a resample directive
before the output, which should cause a resample to 44100 _before_
passing the file on to jack,system. This doesn't work:

$ ecasound -i:ghostriders.mp3 -f:,,44100 -o:jack,system
* ecasound v2.7.0 (C) 1997-2009 Kai Vehmanen and others
(eca-chainsetup) Chainsetup "untitled-chainsetup"
jack_client_new: deprecated
(eca-chainsetup) "rt" buffering mode selected.
(eca-chainsetup) NOTE: using existing audio parameters -f:s16_le,2,22050 for object 'ghostriders.mp3 (tried to open with
... -f:s16_le,2,44100).
(eca-chainsetup) Opened input "ghostriders.mp3", mode "read". Format: s16_le, channels 2, srate 22050, interleaved (locked params).
Warning: type DBC_CHECK soft-assert 'shutdown_request_rep != true' failed at
 -> audioio_jack_manager.cpp:1546 [void AUDIO_IO_JACK_MANAGER::open(int)]
jack_client_new: deprecated
(eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,2,44100 for object 'jack (tried to open with -f:s16_le,2,22050).
(eca-chainsetup) Opened output "jack", mode "write". Format: f32_le, channels 2, srate 44100, noninterleaved (locked params).
ERROR: Connecting chainsetup failed: "All audio objects must have a common sampling rate; sampling rate of audio object "jack"
... differs from engine rate (44100 <-> 22050); unable to continue."

The ecasound man page says, "...when opening existing audio files, many
file formats have a header describing the file audio parameters. In
these cases the audio file header overrides the parameters passed with
-f option." I expect this is what's happening.

> ALSA's default device can usually handle different samplerates, since it's
> defied as a plug device, which has internal conversins enabled.

Do you know how I could access this this when PA is running? PA
apparently co-opts the ALSA default device and I don't know of any way
to access it, or re-create it under another name. I'm thinking that I
might be able to re-use some of the code from the appropriate card file
in /usr/share/alsa using another alsa device name and see if that works.

$ ecasound -i:ghostridpasuspender ers.mp3 -o:alsa,default

produces many pages of "(audioio-db-client) WARNING: Underrun in reading
from "ghostriders.mp3". Trying to recover." followed by a notice that
there were over 3000 xruns.

Perhaps this is important. I wasn't getting any diagnostic messages
from ecaplay, but ecasound is more verbose. With the PA daemon
installed, but ecasound reports massive numbers of xruns on everything I
try to play - which probably accounts for the premature termination of
playback on some files and the failure to play others altogether. I
should have tried this earlier!! This is with jackd out of the way -
not running at all, only PulseAudio in the mix. I don't get this from
GUI player apps, OR from ecasound/ecaplay if PA isn't running. I'll go
google for PulseAudio and xruns and see if this catching anything.

> JACK is mainly
> focused on lowlatency and connectivity between programs. It's built to be
> accurate. So you either need to resample your files externally, decide on the
> lower samplerate, if you mostly use it or try to use one of Ecasound's
> realtime resampling objects.
> By the way: If you have a newer Ecasound version, I think jack_alsa is more
> or less deprecated. You may use it, as long as it works. Now you might want to
> use something like:
> jack,system

This is NICE!! I've been using an older version of ecasound which
wasn't JACK-aware, but it's great to have this flexibility! I've
reviewed the new man page a bit. Very nice!! All the more reason to
keep using the eca stuff.

> system is the client name of your soundcard. It has been so for two or three
> years. Read the man page for more info on jack and jack_multi. jack_multi dan
> be helpful if you want some more elaborate setups.
> Changing JACK's samplerate: There's a textbased app called jack_control.
> I've never used it, but they say, it's exactly for that scenario. Defiing
> JACKd options.

A possibility.

> There example ~/.asoundrc
> pcm.!default

...<snip> -- Thanks very much Julien.

Lindsay Haisley       | "Fighting against human creativity is like 
FMP Computer Services |   trying to eradicate dandelions"
512-259-1190          |    (Pamela Jones)    |
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
Ecasound-list mailing list
Received on Sat Jul 2 00:15:01 2011

This archive was generated by hypermail 2.1.8 : Sat Jul 02 2011 - 00:15:01 EEST