Hello,
I'm attempting to play a file to a caller, then when it has finished,
perform some processing and play another file to the caller.
The examples I have seen use a standard way to initiate file play in
startSession()
...
if(wav_file.open(filename,AmAudioFile::Read))
{
ERROR("Couldn't open file %s.\n", filename.c_str());
throw string("AnnDialog::onSessionStart: Cannot open file\n");
}
setOutput(&wav_file);
and later
void AnnDialog::process(AmEvent* event)
{
AmAudioEvent* audio_event = dynamic_cast<AmAudioEvent*>(event);
if(audio_event && (audio_event->event_id == AmAudioEvent::cleared))
{
DBG("AnnDialog::process: audio event received\n");
dlg.bye();
setStopped();
return;
}
AmSession::process(event);
}
I think I need to modify the process function to start playing a new
file instead of sending a bye to the dialog. However i can't find any
obvious examples of how to do this, and my first pass of using a new
setOutput in the process event doesn't work.
Any advice appreciated.
begin:vcard
fn:Jeremy Ardley
n:Ardley;Jeremy
email;internet:[EMAIL PROTECTED]
tel;work:+61 8 9282 3216
tel;fax:+61 8 9387 7860
tel;cell:+61 419 903 492
note:SIP phone contact <sip:[EMAIL PROTECTED]>
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems