mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-16 07:47:58 +01:00
More uses of SampleBuffer, eliminating explicit DeleteSamples calls
This commit is contained in:
@@ -166,7 +166,7 @@ FLAC__StreamDecoderWriteStatus ODFLACFile::write_callback(const FLAC__Frame *fra
|
||||
///this->ReadData(sampleData, floatSample, 0, mLen);
|
||||
///This class should call ReadHeader() first, so it knows the length, and can prepare
|
||||
///the file object if it needs to.
|
||||
int ODFlacDecoder::Decode(samplePtr & data, sampleFormat & format, sampleCount start, sampleCount len, unsigned int channel)
|
||||
int ODFlacDecoder::Decode(SampleBuffer & data, sampleFormat & format, sampleCount start, sampleCount len, unsigned int channel)
|
||||
{
|
||||
|
||||
//we need to lock this so the target stays fixed over the seek/write callback.
|
||||
@@ -182,8 +182,8 @@ int ODFlacDecoder::Decode(samplePtr & data, sampleFormat & format, sampleCount s
|
||||
mDecodeBufferWritePosition=0;
|
||||
mDecodeBufferLen = len;
|
||||
|
||||
data = NewSamples(len, mFormat);
|
||||
mDecodeBuffer=data;
|
||||
data.Allocate(len, mFormat);
|
||||
mDecodeBuffer = data.ptr();
|
||||
format = mFormat;
|
||||
|
||||
mTargetChannel=channel;
|
||||
|
||||
Reference in New Issue
Block a user