Hello!
While I'm calling callee I want to play one wav file, after 10 seconds
calling I want to play another file and then _continue_ playing first file.
As I understand I can't do this using just one playlist - so I created two.
// first file
if (w_file.open(waiting_wav,AmAudioFile::Read))
throw string("(waiting)\n");
// second file
if (b_file.open(CallCenterFactory::all_busy_wav,AmAudioFile::Read))
throw string("AnnouncementDialog::onSessionStart: Cannot open file
(all_busy)\n");
// item for a second file
busy_item = new AmPlaylistItem(&b_file, NULL);
setInOut(&w_playlist, &w_playlist);
// w_playlist is the playlist for a first file
w_playlist.addToPlaylist(new AmPlaylistItem(&w_file, NULL));
in timer handler:
// b_playlist is the playlist for second file
b_playlist.addToPlaylist(busy_item);
setInOut(&b_playlist, &b_playlist);
in process(..):
void CallCenterDialog::process(AmEvent* event)
{
AmAudioEvent* audio_event = dynamic_cast<AmAudioEvent*>(event);
if(audio_event && (audio_event->event_id == AmAudioEvent::noAudio))
{
setInOut(&w_playlist, &w_playlist);
return;
};
[send to superclass]
};
This work the following way:
1. first file begin playing
2. (after timer) second file begin playing
3. first file continue playing after second finished
4. (after timer) SEMS crashing.
I've tried some other ways (without SEMS crashing) but they are didn't work
in second timer calling.
Could you please help me?
Tnx.
WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
[email protected]
www.oyster-telecom.ru
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems