/[svn]/linuxsampler/trunk/src/engines/gig/InstrumentResourceManager.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/InstrumentResourceManager.cpp

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

revision 1645 by schoenebeck, Sun Nov 25 17:47:46 2007 UTC revision 1646 by persson, Sun Jan 20 15:04:51 2008 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 463  namespace LinuxSampler { namespace gig { Line 463  namespace LinuxSampler { namespace gig {
463       * Give back an instrument. This should be used instead of       * Give back an instrument. This should be used instead of
464       * HandBack if there are some dimension regions that are still in       * HandBack if there are some dimension regions that are still in
465       * use. (When an instrument is changed, the voices currently       * use. (When an instrument is changed, the voices currently
466       * playing is allowed to keep playing with the old instrument       * playing are allowed to keep playing with the old instrument
467       * until note off arrives. New notes will use the new instrument.)       * until note off arrives. New notes will use the new instrument.)
468       */       */
469      void InstrumentResourceManager::HandBackInstrument(::gig::Instrument* pResource, InstrumentConsumer* pConsumer,      void InstrumentResourceManager::HandBackInstrument(::gig::Instrument* pResource, InstrumentConsumer* pConsumer,
470                                                         ::gig::DimensionRegion** dimRegionsInUse) {                                                         RTList< ::gig::DimensionRegion*>* pDimRegionsInUse) {
471          DimRegInfoMutex.Lock();          DimRegInfoMutex.Lock();
472          for (int i = 0 ; dimRegionsInUse[i] ; i++) {          for (RTList< ::gig::DimensionRegion*>::Iterator i = pDimRegionsInUse->first() ; i != pDimRegionsInUse->end() ; i++) {
473              DimRegInfo[dimRegionsInUse[i]].refCount++;              DimRegInfo[*i].refCount++;
474              SampleRefCount[dimRegionsInUse[i]->pSample]++;              SampleRefCount[(*i)->pSample]++;
475          }          }
476          HandBack(pResource, pConsumer, true);          HandBack(pResource, pConsumer, true);
477          DimRegInfoMutex.Unlock();          DimRegInfoMutex.Unlock();

Legend:
Removed from v.1645  
changed lines
  Added in v.1646

  ViewVC Help
Powered by ViewVC