File tree Expand file tree Collapse file tree
windows/APIExample/APIExample/Advanced/CustomAudioCapture Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ void CAgoraCaptureAduioDlg::PullAudioFrameThread(CAgoraCaptureAduioDlg * self)
346346 audioFrame.channels = self->m_renderAudioInfo .channels ;
347347 audioFrame.samples = self->m_renderAudioInfo .sampleRate / 100 * self->m_renderAudioInfo .channels ;
348348 audioFrame.samplesPerSec = self->m_renderAudioInfo .sampleRate ;
349- audioFrame.buffer = new BYTE[audioFrame.samples * audioFrame.bytesPerSample ];
349+ audioFrame.buffer = new BYTE[audioFrame.samples * audioFrame.bytesPerSample * 2 ];
350350 while (self->m_extenalRenderAudio )
351351 {
352352 nRet = mediaEngine->pullAudioFrame (&audioFrame);
@@ -358,7 +358,7 @@ void CAgoraCaptureAduioDlg::PullAudioFrameThread(CAgoraCaptureAduioDlg * self)
358358 SIZE_T nSize = audioFrame.samples * audioFrame.bytesPerSample ;
359359 self->m_audioRender .Render ((BYTE*)audioFrame.buffer , nSize);
360360 }
361- delete audioFrame.buffer ;
361+ delete[] audioFrame.buffer ;
362362}
363363
364364
You can’t perform that action at this time.
0 commit comments