From ee4cd41eac6a7417e8832bc8c1f1683f2f02e4c4 Mon Sep 17 00:00:00 2001 From: richardash1981 Date: Sun, 10 Mar 2013 15:52:38 +0000 Subject: [PATCH] fix deletion of buffers on completion of recording. Patch by Sven Giermann --- src/AudioIO.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index ca950f94b..9864d2567 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -1429,8 +1429,8 @@ void AudioIO::StartStreamCleanup(bool bOnlyBuffers) if(mCaptureBuffers) { - - delete mCaptureBuffers; + for( unsigned int i = 0; i < mCaptureTracks.GetCount(); i++ ) + delete mCaptureBuffers[i]; delete [] mCaptureBuffers; mCaptureBuffers = NULL; } @@ -1438,7 +1438,7 @@ void AudioIO::StartStreamCleanup(bool bOnlyBuffers) if(mResample) { for( unsigned int i = 0; i < mCaptureTracks.GetCount(); i++ ) - delete mResample; + delete mResample[i]; delete [] mResample; mResample = NULL; }