[ecasound] Bug with multiple loop devices

From: Joel Roth <joelz@email-addr-hidden>
Date: Wed Apr 26 2006 - 18:44:09 EEST

Summary: Ecasound's internal state can become
corrupted when using two loop devices in a row.

I was confused when 'setpos', 'rw' and 'fw' would sometimes
stop working, either immediately or after a time, in one of
my chain setups.

First I loaded my chain setup (below), then applied some
effects via IAM through Brad Bowmen's Audio::Ecasound
module, issued a 'start', then sent various positional
commands while the transport was running. The transport
didn't respond to these commands.

I then used 'cs-save-as' to record the engine's state. To
my surprise, this Ecasound-generated chain setup was
invalid, and turns out to differ from the original.

(To the question 'why have a second loopback device at all?'
my answer is that multiple devices may want the mixed
output, for example monitoring the mixed signal while
writing the mixdown output to disk.)

TRANSCRIPT (created using periodic events in the Tk Mainloop.)

iam command: cs-get-position
17.679
iam command: engine-status
running
iam command: cs-get-position
18.68
iam command: engine-status
running
iam command: cs-set-position 0 <------- Go to Start

iam command: cs-get-position
20.294 <------- No response
iam command: engine-status
running
iam command: cs-get-position
21.296
iam command: engine-status
running
iam command: cs-get-position
22.294
iam command: engine-status
running
iam command: cs-get-position
23.295
iam command: engine-status
running
iam command: cs-get-length
695.934
iam command: cs-set-position 685.934 <-------- Go to End - 10s

iam command: cs-get-position
24.358 <------------- No response
iam command: engine-status
running
iam command: cs-get-position
25.359
iam command: engine-status
running
iam command: cs-get-position
26.36
iam command: engine-status
running
iam command: cs-get-position
27.359
iam command: engine-status
running
iam command: getpos
27.434
iam command: setpos 37.434 <------ Go to +10s fails

iam command: cs-get-position
28.442
iam command: engine-status
running
iam command: cs-get-position
29.443
iam command: engine-status
running
iam command: getpos
30.288
iam command: setpos 20.288 <-------- Go to -10s fails

iam command: cs-get-position
31.292

INITIAL CHAIN SETUP

(Chain 1 is the 'mix' track where effects are applied)

# general

 -B auto

# audio inputs

-a:1 -i:loop,111
-a:2 -i:/media/sessions/atsuko-d/leslie-b_9.wav
-a:3 -i:/media/sessions/atsuko-d/guitar_9.wav
-a:4 -i:/media/sessions/atsuko-d/drums_9.wav
-a:5 -i:/media/sessions/atsuko-d/leslie-t_9.wav
-a:6 -i:/media/sessions/atsuko-d/drum2_9.wav
-a:Stereo -i:loop,222

# post-input processing

-a:2 -erc:1,2
-a:3 -erc:1,2
-a:4 -erc:1,2
-a:5 -erc:1,2
-a:6 -erc:1,2

# pre-output processing

-a:2
-a:3
-a:4
-a:5
-a:6

# audio outputs

-a:1 -o:loop,222
-a:2,3,4,5,6 -o:loop,111
-a:Stereo -f:s16_le,2,44100,i -o:alsa,via

INVALID CHAIN SETUP

Notice that in the first line in 'audio inputs' Ecasound
presents what should be an input as an output.

# ecasound chainsetup file

# general
-B:rtlowlatency -n:/home/jroth/ecmd/atsuko-d/session.ecs -X -z:noxruns -z:nopsr -z:mixmode,avg -t:695.934

# audio inputs
-a:1 -f:s16_le,2,44100 -o:loop,111,111 <------------------------------ !!!!!!!!
-a:2 -f:s16_le,1,44100 -i:/media/sessions/atsuko-d/leslie-b_9.wav,
-a:3 -f:s16_le,1,44100 -i:/media/sessions/atsuko-d/guitar_9.wav,
-a:4 -f:s16_le,1,44100 -i:/media/sessions/atsuko-d/drums_9.wav,
-a:5 -f:s16_le,1,44100 -i:/media/sessions/atsuko-d/leslie-t_9.wav,
-a:6 -f:s16_le,1,44100 -i:/media/sessions/atsuko-d/drum2_9.wav,
-a:Stereo -f:s16_le,2,44100 -o:loop,222,222

# audio outputs
-a:1 -f:s16_le,2,44100 -o:loop,222,222
-a:2,3,4,5,6 -f:s16_le,2,44100 -o:loop,111,111
-a:Stereo -f:s16_le,2,44100 -o:alsa,via

# chain operators and controllers
-a:1 -ea:40.00 -epp:50.00
-a:2 -erc:1.00,2.00 -ea:289.00 -epp:81.00
-a:3 -erc:1.00,2.00 -ea:166.00 -epp:30.00
-a:4 -erc:1.00,2.00 -ea:194.00 -epp:46.00
-a:5 -erc:1.00,2.00 -ea:252.00 -epp:74.00
-a:6 -erc:1.00,2.00 -ea:63.00 -epp:46.00

-- 
Joel Roth
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Thu Apr 27 00:15:22 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 27 2006 - 00:15:22 EEST