fix potential crash

This commit is contained in:
Glenn Maynard
2004-05-19 01:52:40 +00:00
parent cec11a8454
commit 0366a45611
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ OSStatus AudioConverter::FormatConverterInputProc(UInt32& ioNumberDataPackets,
// This really shouldn't happen more than once, but better be sure.
if( mBufferSize != buf.mDataByteSize )
{
delete mBuffer;
delete [] mBuffer;
mBufferSize = buf.mDataByteSize;
mBuffer = new UInt8[mBufferSize];
}
+1 -1
View File
@@ -11,7 +11,7 @@ class AudioConverter : public FormatConverterClient
{
public:
AudioConverter( RageSound_CA *driver, const Desc &procFormat );
~AudioConverter() { delete mBuffer; }
~AudioConverter() { delete [] mBuffer; }
protected:
OSStatus FormatConverterInputProc(UInt32& ioNumberDataPackets,
AudioBufferList& ioData,