Hello Tom, Tom van der Geer wrote: > Dear *, > > I'm working on an application which uses a similar class as > AnnounceAuthDialog from the announce_auth example. The only difference > is that I don't want to close the dialog and stop the session when the > audio file (announcement) ended, so I commented out: > //dlg.bye(); > //setStopped(); > > Is it possible to play a second (an third, etc) audio file in this > dialog when this first file ends. When I try calling > "setOutput(&wav_file);" again when the AmAudioEvent comes in, it's not > working. I also tried rewinding the file prior to calling setOutput. If > I call "setOutput" while the first file is still playing it does work... > > Do I need to restore the audio connection for this session when the > first audio file ended? Or is there some other trick to achieve this?
when the file was over, you can see a log message like "removing session from MediaProcessor". This means that the session was removed from the list of sessions that the thread(s) which is(are) in charge of processing audio is responsible for. you can either do wav_file.rewind(); setOutput(&wav_file); AmMediaProcessor::instance()->addSession(this, getCallgroup()); or, what is simpler is to use something like AmPlaylist and put your AmAudioFile into the playlist: The AmPlaylist never returns -1 when audio is read/written (even if it is empty), thus it doesn't happen that it is removed from the AmMediaProcessor. There are many modules which use the playlist to see how this works: examples/pinauthconference, examples/dtmftester, conference, webconference, voicebox etc. If you have many different prompts to play, I'd suggest to look at the AmPromptCollection, that is really useful in combination with AmPlaylist. Stefan > I'm using the sems-0.10.0-bundle on a Debian 4.0 system. Your help is > very much appreciated! > Regards, > > Tom > > _______________________________________________ > Sems mailing list > [email protected] > http://lists.iptel.org/mailman/listinfo/sems -- Stefan Sayer VoIP Services [EMAIL PROTECTED] www.iptego.com iptego GmbH Am Borsigturm 40 13507 Berlin Germany Amtsgericht Charlottenburg, HRB 101010 Geschaeftsfuehrer: Alexander Hoffmann _______________________________________________ Sems mailing list [email protected] http://lists.iptel.org/mailman/listinfo/sems
