/[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 1001 by schoenebeck, Wed Dec 27 16:17:08 2006 UTC revision 1843 by iliev, Sat Feb 21 17:08:18 2009 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   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 27  Line 27 
27  #include "../common/Event.h"  #include "../common/Event.h"
28  #include "../EngineChannel.h"  #include "../EngineChannel.h"
29  #include "../../common/RingBuffer.h"  #include "../../common/RingBuffer.h"
30    #include "../../common/ArrayList.h"
31  #include "../../drivers/audio/AudioChannel.h"  #include "../../drivers/audio/AudioChannel.h"
32  #include "EngineGlobals.h"  #include "EngineGlobals.h"
33  #include "Engine.h"  #include "Engine.h"
# Line 64  namespace LinuxSampler { namespace gig { Line 65  namespace LinuxSampler { namespace gig {
65              virtual bool    StatusChanged(bool bNewStatus = false);              virtual bool    StatusChanged(bool bNewStatus = false);
66              virtual float   Volume();              virtual float   Volume();
67              virtual void    Volume(float f);              virtual void    Volume(float f);
68                virtual float   Pan();
69                virtual void    Pan(float f);
70              virtual uint    Channels();              virtual uint    Channels();
71              virtual void    Connect(AudioOutputDevice* pAudioOut);              virtual void    Connect(AudioOutputDevice* pAudioOut);
72              virtual void    DisconnectAudioOutputDevice();              virtual void    DisconnectAudioOutputDevice();
# Line 84  namespace LinuxSampler { namespace gig { Line 87  namespace LinuxSampler { namespace gig {
87              virtual FxSend* GetFxSend(uint FxSendIndex);              virtual FxSend* GetFxSend(uint FxSendIndex);
88              virtual uint    GetFxSendCount();              virtual uint    GetFxSendCount();
89              virtual void    RemoveFxSend(FxSend* pFxSend);              virtual void    RemoveFxSend(FxSend* pFxSend);
90                virtual void    Connect(VirtualMidiDevice* pDevice);
91                virtual void    Disconnect(VirtualMidiDevice* pDevice);
92    
93              // implementation of abstract methods derived from interface class 'InstrumentConsumer'              // implementation of abstract methods derived from interface class 'InstrumentConsumer'
94              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);              virtual void ResourceToBeUpdated(::gig::Instrument* pResource, void*& pUpdateArg);
# Line 125  namespace LinuxSampler { namespace gig { Line 130  namespace LinuxSampler { namespace gig {
130              int                     iEngineIndexSelf;         ///< Reflects the index of this EngineChannel in the Engine's ArrayList.              int                     iEngineIndexSelf;         ///< Reflects the index of this EngineChannel in the Engine's ArrayList.
131              bool                    bStatusChanged;           ///< true in case an engine parameter has changed (e.g. new instrument, another volumet)              bool                    bStatusChanged;           ///< true in case an engine parameter has changed (e.g. new instrument, another volumet)
132              std::vector<FxSend*>    fxSends;              std::vector<FxSend*>    fxSends;
133                int                     GlobalTranspose;          ///< amount of semi tones all notes should be transposed
134                int                     iLastPanRequest; ///< just for the return value of Pan(), so we don't have to make an injective function
135    
136                /// Command used by the instrument loader thread to
137                /// request an instrument change on a channel.
138                struct instrument_change_command_t {
139                    bool bChangeInstrument;                             ///< Set to true by the loader when the channel should change instrument.
140                    ::gig::Instrument* pInstrument;                     ///< The new instrument. Also used by the loader to read the previously loaded instrument.
141                    RTList< ::gig::DimensionRegion*>* pDimRegionsInUse; ///< List of dimension regions in use by the currently loaded instrument. Continuously updated by the audio thread.
142                };
143                SynchronizedConfig<instrument_change_command_t> InstrumentChangeCommand;
144                SynchronizedConfig<instrument_change_command_t>::Reader InstrumentChangeCommandReader;
145    
146                RTList< ::gig::DimensionRegion*>* pDimRegionsInUse;     ///< temporary pointer into the instrument change command, used by the audio thread
147    
148                SynchronizedConfig< ArrayList<VirtualMidiDevice*> > virtualMidiDevices;
149                SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_AudioThread;
150                SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_MidiThread;
151    
152              void ResetControllers();              void ResetControllers();
153              void ClearEventLists();              void ClearEventLists();
# Line 137  namespace LinuxSampler { namespace gig { Line 160  namespace LinuxSampler { namespace gig {
160          private:          private:
161              void ResetInternal();              void ResetInternal();
162              void RemoveAllFxSends();              void RemoveAllFxSends();
163                void ClearDimRegionsInUse();
164                void ResetDimRegionsInUse();
165                instrument_change_command_t& ChangeInstrument(::gig::Instrument* pInstrument);
166      };      };
167    
168  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.1001  
changed lines
  Added in v.1843

  ViewVC Help
Powered by ViewVC