Hello everyone.
I'm still working with this and have had some success but now I'm having problems.
I am trying to take short clips from a wav file using ECI in C++ and send them to an output wav file. Here's a sample of my code. I get the first 15-second clip but the output file ends there and I get no other clips. I am using a SMIL file as the input control.
case SE_AUDIO:
{
if(! strTargetFile.length())
{
cout << "ERROR: No target file specified.\n";
break;
}
sprintf( strCmd, "ai-add %s", c->GetAudioSrc());
cout << strCmd << ".\n";
e.command(strCmd);
sprintf( strCmd, "ai-select %s", c->GetAudioSrc());
cout << strCmd << ".\n";
e.command(strCmd);
e.command( "cs-set-length -1");
double p1 = (double)(c->GetAudioClipBegin()/1000.0);
if( p1 > 0.0)
{
sprintf( strCmd, "ai-setpos %f", p1);
cout << strCmd << ".\n";
e.command( strCmd);
double p2 = (double)(c->GetAudioClipEnd()/1000.0);
if( p2 > p1)
{
double dur = p2-p1;
sprintf( strCmd, "cs-set-length %f", dur);
cout << strCmd << ".\n";
e.command( strCmd);
}
}
e.command("cs-connect");
e.command( "run");
e.command( "stop");
e.command("cs-disconnect");
sprintf( strCmd, "ai-remove %s", c->GetAudioSrc());
cout << strCmd << ".\n";
e.command( strCmd);
}
break;
The SMIL looks like...
<seq class="background">
<pause dur="1:40.167"/>
<audio src="WhipIt.wav" clipBegin="30.000" clipEnd="45.000"/>
<audio src="WhipIt.wav" clipBegin="1:00.000" clipEnd="1:15.000"/>
</seq>
Does anyone know how I can get this to work?
Thanks.
Keith
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Jul 25 20:15:03 2007
This archive was generated by hypermail 2.1.8 : Wed Jul 25 2007 - 20:15:03 EEST