--- linuxsampler/trunk/src/engines/gig/Engine.h 2008/01/19 20:07:39 1645 +++ linuxsampler/trunk/src/engines/gig/Engine.h 2008/01/20 15:04:51 1646 @@ -60,7 +60,6 @@ Engine(); virtual ~Engine(); void Connect(AudioOutputDevice* pAudioOut); - ::gig::DimensionRegion** ChangeInstrument(EngineChannel* pEngineChannel, ::gig::Instrument* pInstrument); void SuspendAll(); void ResumeAll(); void Suspend(::gig::Region* pRegion); @@ -128,6 +127,7 @@ int MaxFadeOutPos; ///< The last position in an audio fragment to allow an instant fade out (e.g. for voice stealing) without leading to clicks. uint32_t RandomSeed; ///< State of the random number generator used by the random dimension. Mutex ResetInternalMutex; ///< Mutex to protect the ResetInternal function for concurrent usage (e.g. by the lscp and instrument loader threads). + Pool< ::gig::DimensionRegion*>* pDimRegionPool[2]; ///< Double buffered pool, used by the engine channels to keep track of dimension regions in use. void ProcessEvents(EngineChannel* pEngineChannel, uint Samples); void RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples); @@ -158,20 +158,6 @@ friend class Voice; private: - - /// Command used by the instrument loader thread to - /// request an instrument change on a channel. - struct instrument_change_command_t { - EngineChannel* pEngineChannel; - ::gig::Instrument* pInstrument; - }; - struct instrument_change_reply_t { - int dummy; - }; - RingBuffer* InstrumentChangeQueue; ///< Contains the instrument change command - RingBuffer* InstrumentChangeReplyQueue; ///< Contains the acknowledge of an instrument change - ::gig::DimensionRegion** pDimRegionsInUse; ///< After an instrument change, this contains a list of dimension regions that are still in use by playing voices - Pool< ::gig::Region*> SuspendedRegions; Mutex SuspendedRegionsMutex; Condition SuspensionChangeOngoing;