|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Multitrack Recording via Control InterfaceHello!
I recently discovered Ecasound as a handy tool for my problem. I need to record sound (voice only) from different sound cards on one computer. This command line does the job: ecasound -a:1 -i alsahw,1,0 -o ./test1.wav -a:2 -i alsahw,2,0 -o ./test2.wav Now I wanted to develop a small C++ user interface around it but my commands don't work. Either the program does nothing or it hangs. This is what I've got so far: >>>>> 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; // the command chain e.command("c-add " + source_no); // the HW input source e.command("ai-add alsahw," + source_no + ',' + '0'); // output file name e.command("ao-add ./" + current_time + "-s" + source_no + ".wav"); } //e.command("c-select all"); // -> program hangs when enabled e.command("c-list"); e.command("c-status"); 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"); e.command("cop-status"); cerr << "Chain operator status: " << e.last_string() << endl; cout << "Error: " << e.last_error() << endl; <<<<< SNAP <<<<< This code follows the example as found in the Ecasound Control Interface Guide. I don't know if I need the chain setup "recording_chainsetup" because I don't needed it in the command line. Some commands seem to have no effect at all?! (e.g. "c-list", "c-status") This is my output: >>>>> SNIP >>>>> *********************************************************************** * Message from libecasoundc: * * 'ECASOUND' environment variable not set. Using the default value * value 'ECASOUND=ecasound'. *********************************************************************** Starting recording... Chain operator status: ### Chain operator status (chainsetup 'recording_chainsetup') ### Error: <<<<< SNAP <<<<< So, what am I doing wrong? Also, on a side note, how serious will be the synchronisation issue between these recordings? I've read that the speed can alternate due latency and slightly different sampling rates. 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@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
|
|
Re: Multitrack Recording via Control InterfaceHi,
On Wed, 12 Aug 2009, Markus Luttenberger wrote: > Now I wanted to develop a small C++ user interface around it but my > commands don't work. Either the program does nothing or it hangs. This > is what I've got so far: you already solved the actual problem, but for future reference, there are a couple of tool/tricks available to debug ECI problems: - ECASOUND_LOGFILE is useful - see e.g. ecasound(1) man page and for instance http://www.eca.cx/ecasound-list/2006/06/0003.html - the "int-log-history" ECI command, inserted at an appropriate place can reveal what is going on - more in the ECI programmer's guide: - http://www.eca.cx/ecasound/Documentation/programmers_guide/html_ecidoc/eci_doc.html#htoc46 ------------------------------------------------------------------------------ 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@... https://lists.sourceforge.net/lists/listinfo/ecasound-list |
| Free embeddable forum powered by Nabble | Forum Help |