/[svn]/libgig/trunk/src/gig.cpp
ViewVC logotype

Diff of /libgig/trunk/src/gig.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 354 by schoenebeck, Sat Jan 29 14:24:11 2005 UTC revision 355 by schoenebeck, Fri Feb 4 00:21:30 2005 UTC
# Line 541  namespace gig { Line 541  namespace gig {
541                  // local buffer reallocation - hope this won't happen                  // local buffer reallocation - hope this won't happen
542                  if (this->pDecompressionBuffer) delete[] (int8_t*) this->pDecompressionBuffer;                  if (this->pDecompressionBuffer) delete[] (int8_t*) this->pDecompressionBuffer;
543                  this->pDecompressionBuffer    = new int8_t[assumedsize << 1]; // double of current needed size                  this->pDecompressionBuffer    = new int8_t[assumedsize << 1]; // double of current needed size
544                  this->DecompressionBufferSize = assumedsize;                  this->DecompressionBufferSize = assumedsize << 1;
545              }              }
546    
547              int16_t  compressionmode, left, dleft, right, dright;              int16_t  compressionmode, left, dleft, right, dright;
# Line 681  namespace gig { Line 681  namespace gig {
681    
682      Sample::~Sample() {      Sample::~Sample() {
683          Instances--;          Instances--;
684          if (!Instances && pDecompressionBuffer) delete[] (int8_t*) pDecompressionBuffer;          if (!Instances && pDecompressionBuffer) {
685                delete[] (int8_t*) pDecompressionBuffer;
686                pDecompressionBuffer = NULL;
687            }
688          if (FrameTable) delete[] FrameTable;          if (FrameTable) delete[] FrameTable;
689          if (RAMCache.pStart) delete[] (int8_t*) RAMCache.pStart;          if (RAMCache.pStart) delete[] (int8_t*) RAMCache.pStart;
690      }      }
# Line 1404  namespace gig { Line 1407  namespace gig {
1407                  SamplesIterator++;                  SamplesIterator++;
1408              }              }
1409              pSamples->clear();              pSamples->clear();
1410                delete pSamples;
1411    
1412          }          }
1413          // free instruments          // free instruments
# Line 1414  namespace gig { Line 1418  namespace gig {
1418                  InstrumentsIterator++;                  InstrumentsIterator++;
1419              }              }
1420              pInstruments->clear();              pInstruments->clear();
1421                delete pInstruments;
1422          }          }
1423      }      }
1424    

Legend:
Removed from v.354  
changed lines
  Added in v.355

  ViewVC Help
Powered by ViewVC