RE: [h323plus] How to split audioHi, dansukcu!
The best way is deriving H323Codec class and override "write" function (followings for example) and then use it in OpenAudioChannel function.
BOOL H323_XXX_Audio_Codec::Write(const BYTE * buffer, unsigned length, const RTP_DataFrame & /*rtpFrame*/, unsigned & written) { ... }
BOOL H323_XXX_Audio_Codec::WriteRaw(void * data, PINDEX length) { ... }
...
If you want to do more process of the splited audio data, you may also need to implement your own SoundChannel.
Best Wishes, Ryan
From: dansukcu Sent: Friday, October 24, 2008 2:59 PM To: Ryan Yan ; h323plus@lists.packetizer.com Subject: RE: [h323plus] How to split audio
Thank you Ryan,
Will I implement this by deriving H323Codec class and override "write" function and then use it in OpenAudioChannel function or is there another way to do this?
-----Original Message----- From: Ryan Yan [mailto:yanrongrong1983@msn.com] Sent: Fri 10/24/08 9:07 To: dansukcu; h323plus@lists.packetizer.com Subject: Re: [h323plus] How to split audio
How to split audioHi, dansukcu
You can try as follows to get what you want:
After the sound has been decoded, you will get the PCM audio data. The left and right channel sample data is stored one by one (L,R,L,R,L,R...).
For example, if your PCM audio data format is Stereo (channels), 16bit (sample size), 16000kHz (sample rate), then the data in memory is: (1 2) (3 4) (5 6) (7 8) ... (Byte) L R L R ...
From: dansukcu Sent: Friday, October 24, 2008 1:48 PM To: h323plus@lists.packetizer.com Subject: [h323plus] How to split audio
Hi,
I want to split two different audio from voip so that one goes to left and the other goes to right ear of the headphone. Has anyone implemented something like this before or any suggestions?
Thanks,