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 standard sems 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.
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems