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

From: rocco <rocco556@email-addr-hidden>
Date: Tue Apr 02 2013 - 16:21:52 EEST

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.

Here's my session...

I have an ecs file that reads:

#### 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:24,1,96000 -i:1.wav
-a:2 -f:24,1,96000 -i:2.wav
-a:3 -f:24,1,96000 -i:3.wav

# audio outputs
-a:1 -f:24,2,96000 -o:jack,system
-a:2 -f:24,2,96000 -o:jack,system
-a:3 -f:24,2,96000 -o:jack,system

# chain operators and controllers
-a:1 -chcopy:1,2 -epp:13 -ea:155
-a:2 -chcopy:1,2 -epp:85 -ea:143
-a:3 -chcopy:1,2 -epp:50 -ea:24
#### END ECS ####

ecasound> c-select 2
ecasound> ai-status

### Audio input/output status (chainsetup 'Main') ###
Input (1): "1.wav," - [RIFF wave file]
  -> connected to chains "1": position (2.528/60.088) seconds.
  -> open, , s24_le/1ch/96000Hz, buffer 512.
Input (2): "2.wav," - [RIFF wave file]
  -> connected to chains "2": position (2.528/59.865) seconds.
  -> open, , s24_le/1ch/96000Hz, buffer 512.
Input (3): "3.wav," - [RIFF wave file]
  -> connected to chains "3": position (2.528/69.153) seconds.
  -> open, , s24_le/1ch/96000Hz, buffer 512.
Output (1): "jack,system," - [JACK interface]
  -> connected to chains "1": realtime-device; position 242688, delay 0.
  -> open, f32_le/2ch/96000Hz, buffer 512.
Output (2): "jack,system," - [JACK interface]
  -> connected to chains "2": realtime-device; position 242688, delay 0.
  -> open, f32_le/2ch/96000Hz, buffer 512.
Output (3): "jack,system," - [JACK interface]
  -> connected to chains "3": realtime-device; position 242688, delay 0.
  -> open, f32_le/2ch/96000Hz, buffer 512.

ecasound> ai-index-select 2
ecasound> ai-remove

(eca-control) WARNING: This operation requires that chainsetup is
disconnected. Temporarily disconnecting...
- [ Controller/Processing stopped (cond) ] -------------------------------
(audioio_jack_manager) JACK transport: at ecasound stop JACK state is
STOPPED (position 2.528sec)
- [ Engine exiting ] -----------------------------------------------------
(eca-control-objects) Disconnecting chainsetup: "Main".
(eca-control-objects) Removing selected audio input "2.wav" from
selected chains.
(eca-chainsetup) Unable to connect: Chain "2" is not valid. Following
errors were detected:
(eca-chainsetup) Chain "2" is not connected to any input. All chains
must have exactly one valid input. (2.1-NO-CHAIN-INPUT)
(eca-chainsetup) WARNING: Input "3.wav" is not connected to any chain.
(3.1-DISCON-INPUT)
ERROR: Can't reconnect chainsetup.

As you'll see (below), it removed the correct input object (possibly
because the names are all different?), but what about "WARNING: Input
"3.wav" is not connected to any chain. (3.1-DISCON-INPUT)"?

ecasound> cs-save-as 1.ecs

1.ecs reads...

#### 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:s24_le,1,96000 -i:1.wav,
-a:3 -f:s24_le,1,96000 -i:3.wav,

# audio outputs
-a:1 -f:f32_le,2,96000 -o:jack,system,
-a:2 -f:f32_le,2,96000 -o:jack,system,
-a:3 -f:f32_le,2,96000 -o:jack,system,

# chain operators and controllers
-a:1 -chcopy:1.00,2.00 -epp:13.00 -ea:155.00
-a:2 -chcopy:1.00,2.00 -epp:85.00 -ea:143.00
-a:3 -chcopy:1.00,2.00 -epp:50.00 -ea:24.00
#### END ECS ####

ecasound> ai-status

### Audio input/output status (chainsetup 'Main') ###
Input (1): "1.wav," - [RIFF wave file]
  -> connected to chains "1": position (2.528/60.088) seconds.
  -> closed, audio format not available until object is opened.
Input (2): "3.wav," - [RIFF wave file]
  -> connected to chains "3": position (2.528/69.153) seconds.
  -> closed, audio format not available until object is opened.
Output (1): "jack,system," - [JACK interface]
  -> connected to chains "1": realtime-device; position 242688, delay 0.
  -> closed, f32_le/2ch/96000Hz, buffer 512.
Output (2): "jack,system," - [JACK interface]
  -> connected to chains "2": realtime-device; position 242688, delay 0.
  -> closed, f32_le/2ch/96000Hz, buffer 512.
Output (3): "jack,system," - [JACK interface]
  -> connected to chains "3": realtime-device; position 242688, delay 0.
  -> closed, f32_le/2ch/96000Hz, buffer 512.

ecasound> ao-index-select 2
ecasound> ao-remove

(eca-control-objects) Removing selected audio output "jack" from
selected chains.

ecasound> c-selected
2

ecasound> cs-save-as 1.ecs

1.ecs reads...

#### 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:s24_le,1,96000 -i:1.wav,
-a:3 -f:s24_le,1,96000 -i:3.wav,

# audio outputs
-a:1 -f:f32_le,2,96000 -o:jack,system,
-a:2 -f:f32_le,2,96000 -o:jack,system,

# chain operators and controllers
-a:1 -chcopy:1.00,2.00 -epp:13.00 -ea:155.00
-a:2 -chcopy:1.00,2.00 -epp:85.00 -ea:143.00
-a:3 -chcopy:1.00,2.00 -epp:50.00 -ea:24.00
#### END ECS ####

It removed the audio output object on chain 3 instead of chain 2.

I did the exact same thing with alsa inputs and outputs and got exactly
the same outcome.

Also, I noticed if I have this 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,2,48000 -o:jack,system

# chain operators and controllers
-a:1 -chcopy:1,2 -epp:13 -ea:155
-a:2 -chmove:2,1 -chcopy:1,2 -epp:85 -ea:143
-a:3 -chmove:3,1 -chcopy:1,2 -epp:50 -ea:24
### END ECS ###

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, s16_le/1ch/48000Hz, buffer 512.
Input (2): "jack,system," - [JACK interface]
  -> connected to chains "2": realtime-device; position 0, delay 0.
  -> closed, s16_le/2ch/48000Hz, buffer 512.
Input (3): "jack,system," - [JACK interface]
  -> connected to chains "3": realtime-device; position 0, delay 0.
  -> closed, s16_le/3ch/48000Hz, buffer 512.
Output (1): "jack,system," - [JACK interface]
  -> connected to chains "1": realtime-device; position 0, delay 0.
  -> closed, s16_le/2ch/48000Hz, buffer 512.
Output (2): "jack,system," - [JACK interface]
  -> connected to chains "2": realtime-device; position 0, delay 0.
  -> closed, s16_le/2ch/48000Hz, buffer 512.
Output (3): "jack,system," - [JACK interface]
  -> connected to chains "3": realtime-device; position 0, delay 0.
  -> closed, s16_le/2ch/48000Hz, buffer 512.

ecasound> ai-index-select 2
ecasound> ai-remove
ecasound> ao-index-select 2
ecasound> ao-remove
ecasound> c-select 3
ecasound> c-clear
ecasound> cs-save-as 1.ecs

1.ecs reads...

### 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:s16_le,1,48000 -i:jack,system,
-a:2 -f:s16_le,2,48000 -i:jack,system,

# audio outputs
-a:1 -f:s16_le,2,48000 -o:jack,system,
-a:2 -f:s16_le,2,48000 -o:jack,system,

# chain operators and controllers
-a:1 -chcopy:1.00,2.00 -epp:13.00 -ea:155.00
-a:2 -chmove:2.00,1.00 -chcopy:1.00,2.00 -epp:85.00 -ea:143.00
### END ECS ###

Even though it improperly removed the input and output objects (and
chain) for chain 3 instead of 2, I cleared the last remains of chain 3
(c-clear) and it should run... but...

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)
(eca-chainsetup) Chain "3" is not connected to any output. All chains
must have exactly one valid output. (2.2-NO-CHAIN-OUTPUT)
ERROR: Selected chainsetup cannot be connected. Can't perform requested
action.

ecasound> c-list
1,2,3

Also... when there are input objects that that have the same name mixed
with input objects that have different names, you get the wrong input
objects being removed in a more random way. This happens for output
objects that also have similar names mixed with different names.

Unfortunately, this has halted my new approach of deleting tracks or
effects in a more robust way in my front end. I could just stick with
adding a whole chainsetup each time I delete a track (chain) or effect
(chain), but it's not as robust as doing it chain by chain.

Thanks,
Rocco

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Apr 2 16:15:05 2013

This archive was generated by hypermail 2.1.8 : Tue Apr 02 2013 - 16:15:05 EEST