Re: [ecasound] ai-index-select, ai-remove and ao-index-select, ao-remove not working properly

From: Joel Roth <joelz@email-addr-hidden>
Date: Wed Apr 03 2013 - 08:30:58 EEST

rocco wrote:
> >> Quick assessment of the situation, then my complete session...
> >>
> >> It seems that when there are multiple input objects of the same name or
> >> multiple output objects of the same name, 'ai-index-select', 'ai-remove'
> >> and 'ao-index-select', 'ao-remove' removes the wrong object.
> >>
> >> It does (not) seem to have this confusion when the input objects have
> >> different names or the output objects have different names.
> >>
> >> Also, it seems (possibly) that in certain situations, it seems to think
> >> it removed the object from a different chain instead of the chain that
> >> it actually removed it from.
>
> > Hi Rocco,
> >
> > One part of your problem is that you should
> > disconnect your chain setup before modifying
> > the inputs/outputs.
> >
> > By just removing the one input, you have an invalid chain
> > setup. That causes weird complaints when Ecasound tries to
> > reconnect it, (I seem to recall Ecasound performs poorly at
> > providing meaningful information from a broken setup.)
> >
> > So I would try this:
> >
> > cs-disconnect
> > (modify chains)
> > cs-is-valid # should return 1
> > cs-connect
> >
> > Hope this helps.
> >
> > Joel
>
> I was very hopeful because you're a pretty smart guy. But unfortunately,
> I've had the same result using your suggestions.
>
> Just to make sure I was implementing your suggestions correctly, I've
> added my session below. Let me know if you have any other ideas or if
> this is the approach you were referring to...
>
> ECS File...
>
> ### START ECS ###
> # general
> -b:512 -r:50 -z:nointbuf -z:nodb -n:"Main" -X -z:noxruns -z:nopsr
> -z:mixmode,sum
>
> # audio inputs
> -a:1 -f:16,1,48000 -i:jack,system
> -a:2 -f:16,2,48000 -i:jack,system
> -a:3 -f:16,3,48000 -i:jack,system
>
> # audio outputs
> -a:1 -f:16,2,48000 -o:jack,system
> -a:2 -f:16,2,48000 -o:jack,system
> -a:3 -f:16,3,48000 -o:jack,system
>
> # chain operators and controllers
> -a:1 -chcopy:1,2
> -a:2 -chmove:2,1 -chcopy:1,2
> -a:3 -chmove:3,1 -chcopy:1,2
> ### END ECS ###
>
> ecasound> cs-disconnect
>
> (eca-control) NOTE: No chainsetup connected. Trying to connect currently
> selected chainsetup "Main"
> (eca-chainsetup) "rtlowlatency" buffering mode selected.
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,1,96000
> for object 'jack' (tried to open with -f:s16_le,1,48000).
> (eca-chainsetup) Opened input "jack", mode "read". Format: f32_le,
> channels 1, srate 96000, noninterleaved (locked params).
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,2,96000
> for object 'jack' (tried to open with -f:s16_le,2,48000).
> (eca-chainsetup) Opened input "jack", mode "read". Format: f32_le,
> channels 2, srate 96000, noninterleaved (locked params).
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,3,96000
> for object 'jack' (tried to open with -f:s16_le,3,48000).
> (eca-chainsetup) Opened input "jack", mode "read". Format: f32_le,
> channels 3, srate 96000, noninterleaved (locked params).
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,2,96000
> for object 'jack' (tried to open with -f:s16_le,2,96000).
> (eca-chainsetup) Opened output "jack", mode "write". Format: f32_le,
> channels 2, srate 96000, noninterleaved (locked params).
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,2,96000
> for object 'jack' (tried to open with -f:s16_le,2,96000).
> (eca-chainsetup) Opened output "jack", mode "write". Format: f32_le,
> channels 2, srate 96000, noninterleaved (locked params).
> (eca-chainsetup) NOTE: using existing audio parameters -f:f32_le,3,96000
> for object 'jack' (tried to open with -f:s16_le,3,96000).
> (eca-chainsetup) Opened output "jack", mode "write". Format: f32_le,
> channels 3, srate 96000, noninterleaved (locked params).
> - [ Connected chainsetup: "Main" ] ---------------------------------------
> (eca-control-objects) Disconnecting chainsetup: "Main".
>
> ecasound> ai-status
>
> ### Audio input/output status (chainsetup 'Main') ###
> Input (1): "jack,system," - [JACK interface]
> -> connected to chains "1": realtime-device; position 0, delay 0.
> -> closed, f32_le/1ch/96000Hz, buffer 512.
> Input (2): "jack,system," - [JACK interface]
> -> connected to chains "2": realtime-device; position 0, delay 0.
> -> closed, f32_le/2ch/96000Hz, buffer 512.
> Input (3): "jack,system," - [JACK interface]
> -> connected to chains "3": realtime-device; position 0, delay 0.
> -> closed, f32_le/3ch/96000Hz, buffer 512.
> Output (1): "jack,system," - [JACK interface]
> -> connected to chains "1": realtime-device; position 0, delay 0.
> -> closed, f32_le/2ch/96000Hz, buffer 512.
> Output (2): "jack,system," - [JACK interface]
> -> connected to chains "2": realtime-device; position 0, delay 0.
> -> closed, f32_le/2ch/96000Hz, buffer 512.
> Output (3): "jack,system," - [JACK interface]
> -> connected to chains "3": realtime-device; position 0, delay 0.
> -> closed, f32_le/3ch/96000Hz, buffer 512.
>
> ecasound> ai-index-select 2
> ecasound> ai-remove
>
> (eca-control-objects) Removing selected audio input "jack" from selected
> chains.
>
> ecasound> cs-is-valid
>
> (eca-chainsetup) Unable to connect: Chain "3" is not valid. Following
> errors were detected:
> (eca-chainsetup) Chain "3" is not connected to any input. All chains
> must have exactly one valid input. (2.1-NO-CHAIN-INPUT)
> 0

Hi again,

I see that you removed one input, apparently from chain 2,
and got an error reported from chain 3.

But still, I am not sure Ecasound is to 100% to blame.

You need to either (a) remove the output side of chain as
well, or (b) add an input to replace the one you removed.

That's why when you asked Ecasound if cs-is-valid, it said
'0' i.e. "no". And Ecasound gave you the reason, even
though it reported the wrong chain.

If you're removing the input, then why not remove
the whole chain?

c-select 2
c-remove

Finally, if you ask cs-is-valid, and Ecasound returns 0,
then it means that cs-connect will *not* work.

Which is exactly what happens below.

> ecasound> cs-connect
>
> (eca-chainsetup) Unable to connect: Chain "3" is not valid. Following
> errors were detected:

> (eca-chainsetup) Chain "3" is not connected to any input. All chains
> must have exactly one valid input. (2.1-NO-CHAIN-INPUT)
> ERROR: Can't connect; chainsetup not valid!

So to repeat myself, I think you need to make sure you
provide a valid chain setup. Ecasound's behavior is
well defined only in that case.

I don't have much experience using IAM for creating a chain
setup. I use interactive commands only to add/remove effects
and to start/start/move the playback head. For my purposes,
I found it clearer to write the entire chain setup as a file
and load it.

Perhaps Kai will have some other ideas.

Greetings,

Joel
 
> ecasound> t
>
> (eca-chainsetup) Unable to connect: Chain "3" is not valid. Following
> errors were detected:
> (eca-chainsetup) Chain "3" is not connected to any input. All chains
> must have exactly one valid input. (2.1-NO-CHAIN-INPUT)
> ERROR: Selected chainsetup cannot be connected. Can't perform requested
> action.
>
> ecasound> cs-save-as 1.ecs
 
(snip)
 
> I hope Kai gets the opportunity to work with this. It makes the front
> end so much more robust.
>
> Thanks,
> Rocco
>

-- 
Joel Roth
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Apr 3 08:15:02 2013

This archive was generated by hypermail 2.1.8 : Wed Apr 03 2013 - 08:15:02 EEST