Sending Media

In order to receive and then send captured audio data from the audio engine, the instance of CNetworkHandler in the audio engine must be set to:
m_pAudio->SetNetworkController(networkHandler);
CNetworkController instance has to implement a pure virtual function from the abstract class IAudioSampleHandler:
virtual void HandleAudioSamples(char *pData, int iLen) = 0;

The implementation is shown below:

void CNetworkController::HandleAudioSamples(char *pData, int iLen)
{
     m_pAFEngine->Send(m_iAudioChannelRTP,
     pData, iLen,
     AF_NON_BLOCKING);
}