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

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

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

revision 459 by schoenebeck, Fri Mar 4 22:54:11 2005 UTC revision 460 by schoenebeck, Mon Mar 14 22:35:44 2005 UTC
# Line 44  namespace LinuxSampler { namespace gig { Line 44  namespace LinuxSampler { namespace gig {
44      class EngineChannel : public LinuxSampler::EngineChannel, public InstrumentConsumer {      class EngineChannel : public LinuxSampler::EngineChannel, public InstrumentConsumer {
45          public:          public:
46              EngineChannel();              EngineChannel();
47              virtual ~EngineChannel();                          virtual ~EngineChannel();
48              
49              // implementation of abstract methods derived from interface class 'LinuxSampler::EngineChannel'              // implementation of abstract methods derived from interface class 'LinuxSampler::EngineChannel'
50              virtual void    PrepareLoadInstrument(const char* FileName, uint Instrument);              virtual void    PrepareLoadInstrument(const char* FileName, uint Instrument);
51              virtual void    LoadInstrument();              virtual void    LoadInstrument();
52              virtual void    SendNoteOn(uint8_t Key, uint8_t Velocity);              virtual void    SendNoteOn(uint8_t Key, uint8_t Velocity);
53              virtual void    SendNoteOff(uint8_t Key, uint8_t Velocity);              virtual void    SendNoteOff(uint8_t Key, uint8_t Velocity);
54              virtual void    SendPitchbend(int Pitch);              virtual void    SendPitchbend(int Pitch);
55              virtual void    SendControlChange(uint8_t Controller, uint8_t Value);                          virtual void    SendControlChange(uint8_t Controller, uint8_t Value);
56              virtual float   Volume();              virtual float   Volume();
57              virtual void    Volume(float f);              virtual void    Volume(float f);
58              virtual uint    Channels();              virtual uint    Channels();
# Line 64  namespace LinuxSampler { namespace gig { Line 64  namespace LinuxSampler { namespace gig {
64              virtual String  InstrumentName();              virtual String  InstrumentName();
65              virtual int     InstrumentIndex();              virtual int     InstrumentIndex();
66              virtual int     InstrumentStatus();              virtual int     InstrumentStatus();
67              virtual LinuxSampler::Engine* GetEngine();                          virtual LinuxSampler::Engine* GetEngine();
68    
69              // implementation of abstract methods derived from interface class 'InstrumentConsumer'              // implementation of abstract methods derived from interface class 'InstrumentConsumer'
70              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);
71              virtual void ResourceUpdated(::gig::Instrument* pOldResource, ::gig::Instrument* pNewResource, void* pUpdateArg);              virtual void ResourceUpdated(::gig::Instrument* pOldResource, ::gig::Instrument* pNewResource, void* pUpdateArg);
72                
73          //protected:                                //protected:
74              Engine*                 pEngine;              Engine*                 pEngine;
75              float*                  pOutputLeft;              ///< Audio output channel buffer (left)              float*                  pOutputLeft;              ///< Audio output channel buffer (left)
76              float*                  pOutputRight;             ///< Audio output channel buffer (right)              float*                  pOutputRight;             ///< Audio output channel buffer (right)
77              int                     AudioDeviceChannelLeft;   ///< audio device channel number to which the left channel is connected to              int                     AudioDeviceChannelLeft;   ///< audio device channel number to which the left channel is connected to
78              int                     AudioDeviceChannelRight;  ///< audio device channel number to which the right channel is connected to              int                     AudioDeviceChannelRight;  ///< audio device channel number to which the right channel is connected to
79              RingBuffer<Event>*      pEventQueue;              ///< Input event queue.              RingBuffer<Event>*      pEventQueue;              ///< Input event queue.
80              uint8_t                 ControllerTable[128];     ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel.                          RTList<Event>*          pEvents;                  ///< All engine channel specific events for the current audio fragment.
81                RTList<Event>*          pCCEvents;                ///< All control change events for the current audio fragment on this engine channel.
82                RTList<Event>*          pSynthesisEvents[Event::destination_count]; ///< Events directly affecting synthesis parameters (like pitch, volume and filter).
83                uint8_t                 ControllerTable[128];     ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel.
84              midi_key_info_t*        pMIDIKeyInfo;             ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key              midi_key_info_t*        pMIDIKeyInfo;             ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key
85              Pool<uint>*             pActiveKeys;              ///< Holds all keys in it's allocation list with active voices.                          Pool<uint>*             pActiveKeys;              ///< Holds all keys in it's allocation list with active voices.
86              std::map<uint,uint*>    ActiveKeyGroups;          ///< Contains active keys (in case they belong to a key group) ordered by key group ID.              std::map<uint,uint*>    ActiveKeyGroups;          ///< Contains active keys (in case they belong to a key group) ordered by key group ID.
87              ::gig::Instrument*      pInstrument;              ::gig::Instrument*      pInstrument;
88              bool                    SustainPedal;             ///< true if sustain pedal is down              bool                    SustainPedal;             ///< true if sustain pedal is down
# Line 92  namespace LinuxSampler { namespace gig { Line 95  namespace LinuxSampler { namespace gig {
95              int                     InstrumentIdx;              int                     InstrumentIdx;
96              String                  InstrumentIdxName;              String                  InstrumentIdxName;
97              int                     InstrumentStat;              int                     InstrumentStat;
98              RTList<Voice>::Iterator itLastStolenVoice;        ///< Only for voice stealing: points to the last voice which was theft in current audio fragment, NULL otherwise.              int                     iEngineIndexSelf;         ///< Reflects the index of this EngineChannel in the Engine's ArrayList.
99              RTList<uint>::Iterator  iuiLastStolenKey;         ///< Only for voice stealing: key number of last key on which the last voice was theft in current audio fragment, NULL otherwise.  
100                void ClearEventLists();
101                void ImportEvents(uint Samples);
102    
103              friend class Engine;              friend class Engine;
104              friend class Voice;              friend class Voice;
105              friend class InstrumentResourceManager;              friend class InstrumentResourceManager;
106                
107          private:          private:
108              void ResetInternal();              void ResetInternal();
109      };      };

Legend:
Removed from v.459  
changed lines
  Added in v.460

  ViewVC Help
Powered by ViewVC