RE: [ecasound] Newcomer problem with loop device

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Wed Aug 24 2005 - 10:36:06 EEST

On Wed, 24 Aug 2005, Stuart Allie wrote:

> Erno Palonheimo wrote:
>> I am having trouble with loop device. The setup is as follows:
>> % ecasound \
>> -a:master -i:loop,1 -o:jack_auto,alsa_pcm \
>> -a:tape -i:jack_generic,audio_in -o:loop,1 \
>> -a:mic -i:jack_auto,alsa_pcm -o:loop,1
>
> ecasound \
> -a:master -i:loop,1 -o:jack_auto,alsa_pcm \
> -a:tape -i:jack_generic,audio_in \
> -a:mic -i:jack_auto,alsa_pcm \
> -a:tape,mic -o:loop,1

Yep, the above is the correct way to do it.

The basic concept for connecting chains is: to connect an input or output
to multiple chains, you have to 1) select multiple chains, and 2) add the
input/output.

With loop devices, this is a bit tricky, as you don't want to create
multiple "-o:loop,1"'s (using Erno's example here), but instead route all
the chains through the one "-o:loop,1" object.

If you replace "-o:loop,1" with "-o:jack", Erno's setup is ok to ecasound
-- it's a normal use case to have separate jack output objects in
ecasound, connected to different input chains.

Janne Halttunen actually posted a patch in 2002/Dec that adds chainsetup
"preparsing", which basicly automatically fixes above type of errors. But
as it was a generic version that merges all objects that have identical
label (like "-o:loop,1", "-o:jack"), I couldn't commit it the the
mainline back then.

But, but, thinking about this again, I guess we really should fix this,
specifically for the case of loop-devices. I'm a bit worried about adding
multiple ways to do the same stuff (after the fix, both Erno's and
Stuart's version would work), but I guess in this case making the fix
actually causes less confusion. What do you guys think?

> 1. for each output x:
> 2. if x is the output we want to attach:
> 3. for each chain c:
> 4. if c is currently attached to x, disconnect it
> 5. for each selected chain d:
> 6. connect x as the output for d
>
> (and similar for inputs in attach_input_to_selected_chains.)
>
> Now, a possible fix is to remove the code that disconnects any chain
> currently connected to the output we are concerned with (lines 3 and 4).
> This works for the case that Erno described, and I'm pretty sure it
> doesn't cause any other problems.

That's an accurate description of the algorithm. :) The above fix would
help with Erno's case, but break many current uses of "c-select, ai-add,
ao-edd, ai-attach, ao-attach, etc" interactive mode commands. But I do
agree with the basic idea...

--
  links, my public keys, etc at http://eca.cx/kv
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Aug 24 12:15:08 2005

This archive was generated by hypermail 2.1.8 : Wed Aug 24 2005 - 12:15:08 EEST