AAC - audio decoding and audio rendering

AAC - audio decoding and audio rendering


I have tried to do AAC - audio streaming from the camera using the IPP audio-video codecs.
The following are the steps i have done.
The initialization was done only once.

m_pAudioparams->m_info_in.sample_frequency = 8000;

m_pAudioparams->m_info_in.bitPerSample = 16;

m_pAudioparams->m_info_in.channels = 2;

m_pAudioparams->m_info_in.bitrate = 32000;

m_pAudioparams->m_info_in.stream_type = UMC::AAC_MPEG_STREAM;

m_pAudioparams->m_pData = rtspClient->m_pAudMediaIn;

// where m_pAudioparams is UMC::AudioCodecParams

if (UMC::UMC_OK = (m_pAudioDecoder->Init(m_pAudioparams)))
//initialization Sucess

2) Then

m_pAudMediaIn->SetBufferPointer((Ipp8u *)szData,len);

// m_pAudMediaIn is UMC::MediaData object ,szData is raw audio buffer from the camera i get everytime as it streams, len is length of the audio buffer.


is set eveytime.


UMC::Status stRes = m_pAudioDecoder->GetFrame(m_pAudMediaIn,m_pAudMediaOut);

if(UMC::UMC_OK == stRes)


// Audio Renderer initialization is done only once


m_bFirst =TRUE;

m_pAudioRenderParams->info = m_pAudioparams->m_info_out;
// At this point I got m_info_out.channels = 0,m_info_out.samplefrequency = 16000,m_info_out.bitrate = 0, m_info_out.bitpersample = 16,m_info_out.stream_type = PCM_AUDIO.

UMC::HWNDModuleContext hmcontext;

hmcontext.m_hWnd = (HWND)m_hWnd;

m_pAudioRenderParams->pModuleContext = &hmcontext;

UMC::Status stRes = m_pAudioRender->Init(m_pAudioRenderParams); //m_pAudioRender is UMC::WinMMAudioRender() HERE initialization is failing.



UMC::Status sta = m_pAudioRender->SendFrame(m_pAudMediaOut);



In this stepthe AACdecoder->getframe returns UMC::UMC_OK whenever it gets the frame.

I am having problem in initailizing the audiorender. It is failing.Could anyone please help me out where I am doing wrong?

Please reply.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.