Stefan Sayer wrote:
you can use AmAudioQueue (AmAdvancedAudio.h) to write audio to two AmAudio devices. put both the audio_connector and the AmAudioFile in the write queue, and it will write to both. You don't even have to modify the AmAudioConnector, you just catch the b2abconnectaudio event, and after it is connected, you get the output with getOutput() and put it in the queue, like
MySession::onB2ABEvent(ev) {
AmB2ABCallerSession::onB2ABEvent(ev);
if (ev-event-id==B2ABConnectAudio) {
 lockAudio();
audio_queue.pushAudio(getOutput(), AmAudioQueue::OutputQueue, AmAudioQueue::Back, true, false); audio_queue.pushAudio(my_audio_file, AmAudioQueue::OutputQueue, AmAudioQueue::Back, true, false);
 setOutput(audio_queue);
 unlockAudio();
}


i've done some testing with the AmAudioQueue alone...
So, when i use it to write to the connector and a file (each leg to diffrent file) everything works fine - but unfortunately i have two not mixed files :P I've even tried to push the same AmAudioFile object, to both queues to get both streams in one file, but that was obviusly stupid - a lot of sync problems, and the output audio file was full of strange noise. I assume that we have to use some "syncing device" like an AmMultiPartyMixer used in AmConferenceChannel - but then we're getting AmAudio object with mixed stream - it is easy to use it to feed another (third) session, but how to use it to write the mixed stream ?


Regards,
--
Wojciech Wrona

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to