Re: [ecasound] Multitrack Recording via Control Interface

From: Joel Roth <joelz@email-addr-hidden>
Date: Thu Aug 13 2009 - 05:04:46 EEST

On Wed, Aug 12, 2009 at 04:08:10PM +0200, Markus Luttenberger wrote:
> Hello!
>
>
> Ok, I've fixed some stuff by myself but the main problem still exists.
> Now I know that my chainsetup is somehow invalid thus it cannot be
> connected - but no idea what's wrong.
>
> This is the current code:
>
> >>>>> SNIP >>>>>
>
> ...
> int sources = 3; // user input
> ...
>
> //--------------------------------------------------------------------------
> // construct ECA control interface and configure it for recording
> ECA_CONTROL_INTERFACE e;
> const string current_time(getCurrentTime());
>
> e.command("cs-add recording_chainsetup");
>
> for (int count = 1; count <= sources; count++)
> {
> const char source_no = '0' + count;
> string file_name = "./" + current_time + "-s" + source_no + ".wav";
> // the command chain
> e.command("c-add chain" + source_no);
> // the HW input source
> e.command("ai-add alsahw," + source_no + ',' + '0');
> // output file name
> e.command("ao-add " + file_name);
> }
>
> e.command("cs-select recording_chainsetup");
> e.command("c-select all");
> e.command("cs-is-valid");
> cout << "cs is valid: " << e.last_integer() << endl;
> e.command("cs-connect");
> e.command("start");
> cout << "Starting recording...\n";
>
> while (1)
> {
> sleep(1);
> e.command("engine-status");
> if (e.last_string() != "running")
> break;
> }
>
> e.command("stop");
> e.command("cs-disconnect");
> cerr << "Error: " << e.last_error() << endl;
>
> <<<<< SNAP <<<<<
>
> I also figured out why I didn't get any status information with
> "cs-status" first (should read the manual more carefully).
>
> This is my output:
>
>
> >>>>> SNIP >>>>>
>
> ***********************************************************************
> * Message from libecasoundc:
> *
> * 'ECASOUND' environment variable not set. Using the default value
> * value 'ECASOUND=ecasound'.
> ***********************************************************************
>
> cs is valid: 0

Hi Markus,

The Ecasound engine can do nothing without a valid chain
setup, i.e. cs_is_valid: 1

I find it easier for troubleshooting
to generate my chain setups as .ecs files.

then use ECI commands to do something like

cs-load setup.ecs
start

Perhaps someone else can help you debug the
code you posted.

Good luck,

Joel

> Starting recording...
> Error: ERROR: Selected chainsetup cannot be connected. Can't perform
> requested action.
>
> <<<<< SNAP <<<<<
>
>
> Oh, and i'm using ecasound v2.6.0.
>
>
>
> greetings..
> ..Markus
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@email-addr-hidden
> https://lists.sourceforge.net/lists/listinfo/ecasound-list

-- 
Joel Roth
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Thu Aug 13 08:15:02 2009

This archive was generated by hypermail 2.1.8 : Thu Aug 13 2009 - 08:15:02 EEST