/[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 53 by schoenebeck, Mon Apr 26 17:15:51 2004 UTC revision 225 by schoenebeck, Sun Aug 22 14:46:47 2004 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck         *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *                                                                         *   *                                                                         *
7   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
8   *   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 34  Line 34 
34  #include "../../common/ConditionServer.h"  #include "../../common/ConditionServer.h"
35  #include "../common/Engine.h"  #include "../common/Engine.h"
36  #include "../common/Event.h"  #include "../common/Event.h"
37    #include "../common/BiquadFilter.h"
38  #include "../../lib/fileloader/libgig/gig.h"  #include "../../lib/fileloader/libgig/gig.h"
39  #include "InstrumentResourceManager.h"  #include "InstrumentResourceManager.h"
40  #include "../../network/lscp.h"  #include "../../network/lscp.h"
41    
42  #define PITCHBEND_SEMITONES             12  #define PITCHBEND_SEMITONES             12
43  #define MAX_AUDIO_VOICES                64  #define MAX_AUDIO_VOICES                128
44    
45  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
46    
# Line 68  namespace LinuxSampler { namespace gig { Line 69  namespace LinuxSampler { namespace gig {
69              virtual void   SendControlChange(uint8_t Controller, uint8_t Value);              virtual void   SendControlChange(uint8_t Controller, uint8_t Value);
70              virtual float  Volume();              virtual float  Volume();
71              virtual void   Volume(float f);              virtual void   Volume(float f);
72                virtual uint   Channels();
73              virtual void   Connect(AudioOutputDevice* pAudioOut);              virtual void   Connect(AudioOutputDevice* pAudioOut);
74              virtual void   DisconnectAudioOutputDevice();              virtual void   DisconnectAudioOutputDevice();
75                virtual void   SetOutputChannel(uint EngineAudioChannel, uint AudioDeviceChannel);
76                virtual int    OutputChannel(uint EngineAudioChannel);
77              virtual int    RenderAudio(uint Samples);              virtual int    RenderAudio(uint Samples);
78              virtual uint   VoiceCount();              virtual uint   VoiceCount();
79              virtual uint   VoiceCountMax();              virtual uint   VoiceCountMax();
# Line 80  namespace LinuxSampler { namespace gig { Line 84  namespace LinuxSampler { namespace gig {
84              virtual String DiskStreamBufferFillPercentage();              virtual String DiskStreamBufferFillPercentage();
85              virtual String Description();              virtual String Description();
86              virtual String Version();              virtual String Version();
87                virtual String EngineName();
88                virtual String InstrumentFileName();
89                virtual int    InstrumentIndex();
90                virtual int    InstrumentStatus();
91    
92              // abstract methods derived from interface class 'InstrumentConsumer'              // abstract methods derived from interface class 'InstrumentConsumer'
93              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);
# Line 96  namespace LinuxSampler { namespace gig { Line 104  namespace LinuxSampler { namespace gig {
104              static InstrumentResourceManager Instruments;              static InstrumentResourceManager Instruments;
105    
106              AudioOutputDevice*      pAudioOutputDevice;              AudioOutputDevice*      pAudioOutputDevice;
107                float*                  pOutputLeft;           ///< Audio output channel buffer (left)
108                float*                  pOutputRight;          ///< Audio output channel buffer (right)
109                int                     AudioDeviceChannelLeft;  ///< audio device channel number to which the left channel is connected to
110                int                     AudioDeviceChannelRight; ///< audio device channel number to which the right channel is connected to
111                uint                    SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)
112                uint                    MaxSamplesPerCycle;    ///< Size of each audio output buffer
113              DiskThread*             pDiskThread;              DiskThread*             pDiskThread;
114              uint8_t                 ControllerTable[128];  ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel.              uint8_t                 ControllerTable[128];  ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel.
115              RingBuffer<Event>*      pEventQueue;           ///< Input event queue.              RingBuffer<Event>*      pEventQueue;           ///< Input event queue.
# Line 108  namespace LinuxSampler { namespace gig { Line 122  namespace LinuxSampler { namespace gig {
122              RTEList<Event>*         pCCEvents;             ///< All control change events for the current audio fragment.              RTEList<Event>*         pCCEvents;             ///< All control change events for the current audio fragment.
123              RTEList<Event>*         pSynthesisEvents[Event::destination_count];     ///< Events directly affecting synthesis parameter (like pitch, volume and filter).              RTEList<Event>*         pSynthesisEvents[Event::destination_count];     ///< Events directly affecting synthesis parameter (like pitch, volume and filter).
124              float*                  pSynthesisParameters[Event::destination_count]; ///< Matrix with final synthesis parameters for the current audio fragment which will be used in the main synthesis loop.              float*                  pSynthesisParameters[Event::destination_count]; ///< Matrix with final synthesis parameters for the current audio fragment which will be used in the main synthesis loop.
125                biquad_param_t*         pBasicFilterParameters; ///< Biquad parameters of the basic bandpass filter.
126                biquad_param_t*         pMainFilterParameters;  ///< Main biquad parameters of the individual filter (lowpass / bandpass / highpass).
127              RIFF::File*             pRIFF;              RIFF::File*             pRIFF;
128              ::gig::File*            pGig;              ::gig::File*            pGig;
129              ::gig::Instrument*      pInstrument;              ::gig::Instrument*      pInstrument;
# Line 118  namespace LinuxSampler { namespace gig { Line 134  namespace LinuxSampler { namespace gig {
134              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start
135              bool                    SuspensionRequested;              bool                    SuspensionRequested;
136              ConditionServer         EngineDisabled;              ConditionServer         EngineDisabled;
137                String                  InstrumentFile;
138                int                     InstrumentIdx;
139                int                     InstrumentStat;
140    
141              void ProcessNoteOn(Event* pNoteOnEvent);              void ProcessNoteOn(Event* pNoteOnEvent);
142              void ProcessNoteOff(Event* pNoteOffEvent);              void ProcessNoteOff(Event* pNoteOffEvent);
# Line 135  namespace LinuxSampler { namespace gig { Line 154  namespace LinuxSampler { namespace gig {
154              friend class VCOManipulator;              friend class VCOManipulator;
155              friend class InstrumentResourceManager;              friend class InstrumentResourceManager;
156          private:          private:
             //static void AllocateSynthesisParametersMatrix();  
   
157              void DisableAndLock();              void DisableAndLock();
158      };      };
159    

Legend:
Removed from v.53  
changed lines
  Added in v.225

  ViewVC Help
Powered by ViewVC