--- linuxsampler/trunk/src/engines/gig/Engine.h 2005/04/29 14:20:22 502 +++ linuxsampler/trunk/src/engines/gig/Engine.h 2005/06/18 21:37:03 663 @@ -26,11 +26,8 @@ #include "../../common/global.h" -#if DEBUG_HEADERS -# warning Engine.h included -#endif // DEBUG_HEADERS - #include +#include #include "EngineGlobals.h" #include "../../common/RingBuffer.h" @@ -40,7 +37,6 @@ #include "../common/Engine.h" #include "../common/Event.h" #include "../common/BiquadFilter.h" -#include "../../lib/fileloader/libgig/gig.h" #include "../../network/lscp.h" #include "EngineChannel.h" @@ -103,10 +99,12 @@ int ActiveVoiceCount; ///< number of currently active voices (this value will be returned for public calls) int ActiveVoiceCountTemp; ///< number of currently active voices (for internal usage, will be used for incrementation) int ActiveVoiceCountMax; ///< the maximum voice usage since application start - int VoiceTheftsLeft; ///< We only allow MAX_AUDIO_VOICES voices to be stolen per audio fragment, we use this variable to ensure this limit. + int VoiceSpawnsLeft; ///< We only allow CONFIG_MAX_VOICES voices to be spawned per audio fragment, we use this variable to ensure this limit. RTList::Iterator itLastStolenVoice; ///< Only for voice stealing: points to the last voice which was theft in current audio fragment, NULL otherwise. RTList::Iterator iuiLastStolenKey; ///< Only for voice stealing: key number of last key on which the last voice was theft in current audio fragment, NULL otherwise. EngineChannel* pLastStolenChannel; ///< Only for voice stealing: points to the engine channel on which the previous voice was stolen in this audio fragment. + RTList::Iterator itLastStolenVoiceGlobally; ///< Same as itLastStolenVoice, but engine globally + RTList::Iterator iuiLastStolenKeyGlobally; ///< Same as iuiLastStolenKey, but engine globally bool SuspensionRequested; ConditionServer EngineDisabled; int8_t ScaleTuning[12]; ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave @@ -130,6 +128,7 @@ void FreeKey(EngineChannel* pEngineChannel, midi_key_info_t* pKey); void ResetSynthesisParameters(Event::destination_t dst, float val); void ResetInternal(); + void ResetScaleTuning(); static Engine* AcquireEngine(LinuxSampler::gig::EngineChannel* pChannel, AudioOutputDevice* pDevice); static void FreeEngine(LinuxSampler::gig::EngineChannel* pChannel, AudioOutputDevice* pDevice); @@ -151,6 +150,8 @@ void AdjustScale(int8_t ScaleTunes[12]); void ReleaseAllVoices(EngineChannel* pEngineChannel, Pool::Iterator& itReleaseEvent); void KillAllVoices(EngineChannel* pEngineChannel, Pool::Iterator& itKillEvent); + + unsigned long FrameTime; ///< Time in frames of the start of the current audio fragment }; }} // namespace LinuxSampler::gig