Re: [GnomeMeeting-devel-list] Modifications to GnomeMeeting
- From: Craig Southeren <craigs postincrement com>
- To: Bryce Lobdell <lobdell uiuc edu>, GnomeMeeting development mailing list <gnomemeeting-devel-list gnome org>
- Cc:
- Subject: Re: [GnomeMeeting-devel-list] Modifications to GnomeMeeting
- Date: Wed, 08 Feb 2006 11:46:36 +1100
On Tue, 07 Feb 2006 18:38:04 -0600
Bryce Lobdell <lobdell uiuc edu> wrote:
>
> I want to alter the buffers the feed (are fed) by the audio DAC (ADC).
>
> I found this snip of code in endpoint.cpp and I have read about the
> structure of openh323 on openh323.org.
>
> /* Control the channel and attach it to the codec, do not auto delete it
> */
> sound_channel->SetBuffers (bufferSize, soundChannelBuffers);
> no_error = codec.AttachChannel (sound_channel);
>
>
> Is it correct that some derivative of H323Codec is given an audio stream
> class with AttachChannel()? And after that, the H323Codec object
> repeatedly calls the PlaySound() and RecordSound() functions from the
> PSoundChannel object that was passed to AttachChannel?
Correct
> Can I override the PlaySound() and RecordSound() functions in the
> PSoundChannel object, and then manipulate the audio signals in those
> redefined functions?
That is one way to do it, but this will be complicated by the plugin
audio device system.
However, there is a much easier way to do this.
The codec class allows the insertion of arbitrary filters into the audio
stream to allow manipulation of the audio buffers in whatever way you
like. Some brief docs on how to do this this can be found in the
codecs.h file as follows:
Add a filter to the codec.
The call back function is executed just after reading from, or just
before writing to, the raw data channel. The callback is passed the
H323Codec::FilterInfo structure containing the data that is being
read or written.
To use define:
PDECLARE_NOTIFIER(H323Codec::FilterInfo, YourClass, YourFunction);
and
void YourClass::YourFunction(H323Codec::FilterInfo & info, INT)
{
// DO something with data
}
and to connect to a codec:
BOOL YourClass::OnStartLogicalChannel(H323Channel & channel)
{
H323Codec * codec = channel.GetCodec();
codec->AddFilter(PCREATE_NOTIFIER(YourFunction));
}
for example. Other places can be used to set the filter.
I hope this helps
Craig
-----------------------------------------------------------------------
Craig Southeren craigs postincrement com / craigs voxgratia org
Phone: +61 243654666 ICQ: #86852844
Fax: +61 243673140 MSN: craig_southeren hotmail com
Mobile: +61 417231046 Jabber: craigs jabber voxgratia org
Post Increment - Consulting & Services http://www.postincrement.com
Vox Gratia - The Open Source VoIP portal http://www.voxgratia.org
VoIP products http://www.sunkom.com.au
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]