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
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
Received on Thu Aug 13 00:15:02 2009
This archive was generated by hypermail 2.1.8 : Thu Aug 13 2009 - 00:15:02 EEST