/[svn]/linuxsampler/trunk/src/engines/gig/Engine.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Engine.h

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

revision 437 by schoenebeck, Sat Feb 26 22:44:51 2005 UTC revision 438 by persson, Wed Mar 9 22:12:15 2005 UTC
# Line 56  namespace LinuxSampler { namespace gig { Line 56  namespace LinuxSampler { namespace gig {
56       * Sampler engine for the Gigasampler format.       * Sampler engine for the Gigasampler format.
57       */       */
58      class Engine : public LinuxSampler::Engine {      class Engine : public LinuxSampler::Engine {
59          public:                    public:
60              // methods              // methods
61              Engine();              Engine();
62             ~Engine();             ~Engine();
# Line 78  namespace LinuxSampler { namespace gig { Line 78  namespace LinuxSampler { namespace gig {
78              virtual String Description();              virtual String Description();
79              virtual String Version();              virtual String Version();
80              virtual String EngineName();              virtual String EngineName();
81                            
82          //protected:                      //protected:
83              static InstrumentResourceManager instruments;              static InstrumentResourceManager instruments;
84    
85              AudioOutputDevice*      pAudioOutputDevice;              AudioOutputDevice*      pAudioOutputDevice;
86              uint                    SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)              uint                    SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)
87              uint                    MaxSamplesPerCycle;    ///< Size of each audio output buffer              uint                    MaxSamplesPerCycle;    ///< Size of each audio output buffer
88              DiskThread*             pDiskThread;                        DiskThread*             pDiskThread;
89              RingBuffer<Event>*      pEventQueue;           ///< Input event queue for engine global events (e.g. SysEx messages).              RingBuffer<Event>*      pEventQueue;           ///< Input event queue for engine global events (e.g. SysEx messages).
90              Pool<Voice>*            pVoicePool;            ///< Contains all voices that can be activated.                                                  Pool<Voice>*            pVoicePool;            ///< Contains all voices that can be activated.
91              EventGenerator*         pEventGenerator;                          EventGenerator*         pEventGenerator;
92              RTList<Event>*          pVoiceStealingQueue;   ///< All voice-launching events which had to be postponed due to free voice shortage.              RTList<Event>*          pVoiceStealingQueue;   ///< All voice-launching events which had to be postponed due to free voice shortage.
93              RTList<Event>*          pEvents;               ///< All events for the current audio fragment.              RTList<Event>*          pEvents;               ///< All events for the current audio fragment.
94              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.
# Line 103  namespace LinuxSampler { namespace gig { Line 103  namespace LinuxSampler { namespace gig {
103              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start
104              bool                    SuspensionRequested;              bool                    SuspensionRequested;
105              ConditionServer         EngineDisabled;              ConditionServer         EngineDisabled;
106              int8_t                  ScaleTuning[12];       ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave                          int8_t                  ScaleTuning[12];       ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave
107              int                     MaxFadeOutPos;         ///< The last position in an audio fragment to allow an instant fade out (e.g. for voice stealing) without leading to clicks.              int                     MaxFadeOutPos;         ///< The last position in an audio fragment to allow an instant fade out (e.g. for voice stealing) without leading to clicks.
108                uint32_t                RandomSeed;            ///< State of the random number generator used by the random dimension.
109    
110              void RenderAudio(EngineChannel* pEngineChannel, uint Samples);              void RenderAudio(EngineChannel* pEngineChannel, uint Samples);
111              void ClearEventLists();                          void ClearEventLists();
112              void ImportEvents(RingBuffer<Event>* pEventQueue, uint Samples);              void ImportEvents(RingBuffer<Event>* pEventQueue, uint Samples);
113              void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent);              void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent);
114              void ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent);              void ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent);
# Line 131  namespace LinuxSampler { namespace gig { Line 132  namespace LinuxSampler { namespace gig {
132              friend class EGDecay;              friend class EGDecay;
133              friend class VCAManipulator;              friend class VCAManipulator;
134              friend class VCFCManipulator;              friend class VCFCManipulator;
135              friend class VCOManipulator;                          friend class VCOManipulator;
136          private:          private:
137              std::list<EngineChannel*> engineChannels; ///< All engine channels of a gig::Engine instance.              std::list<EngineChannel*> engineChannels; ///< All engine channels of a gig::Engine instance.
138                            
139              static std::map<AudioOutputDevice*,Engine*> engines; ///< All instances of gig::Engine.              static std::map<AudioOutputDevice*,Engine*> engines; ///< All instances of gig::Engine.
140                            
141              uint8_t GSCheckSum(const RingBuffer<uint8_t>::NonVolatileReader AddrReader, uint DataSize);              uint8_t GSCheckSum(const RingBuffer<uint8_t>::NonVolatileReader AddrReader, uint DataSize);
142              void    AdjustScale(int8_t ScaleTunes[12]);              void    AdjustScale(int8_t ScaleTunes[12]);
143      };      };

Legend:
Removed from v.437  
changed lines
  Added in v.438

  ViewVC Help
Powered by ViewVC