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

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

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

revision 505 by schoenebeck, Tue May 3 01:00:25 2005 UTC revision 687 by schoenebeck, Tue Jul 12 22:37:21 2005 UTC
# Line 26  Line 26 
26    
27  #include "../../common/global.h"  #include "../../common/global.h"
28    
 #if DEBUG_HEADERS  
 # warning Voice.h included  
 #endif // DEBUG_HEADERS  
   
29  #include <gig.h>  #include <gig.h>
30    
31  #include "../../common/RTMath.h"  #include "../../common/RTMath.h"
# Line 90  namespace LinuxSampler { namespace gig { Line 86  namespace LinuxSampler { namespace gig {
86              void Reset();              void Reset();
87              void SetOutput(AudioOutputDevice* pAudioOutputDevice);              void SetOutput(AudioOutputDevice* pAudioOutputDevice);
88              void SetEngine(Engine* pEngine);              void SetEngine(Engine* pEngine);
89              int  Trigger(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent, int PitchBend, ::gig::Instrument* pInstrument, int iLayer, bool ReleaseTriggerVoice, bool VoiceStealingAllowed);              int  Trigger(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent, int PitchBend, ::gig::DimensionRegion* pDimRgn, type_t VoiceType, int iKeyGroup);
90              inline bool IsActive() { return PlaybackState; }              inline bool IsActive() { return PlaybackState; }
91                inline bool IsStealable() { return !itKillEvent && PlaybackState >= playback_state_ram; }
92          //private:          //private:
93              // Types              // Types
94              enum playback_state_t {              enum playback_state_t {
95                  playback_state_end  = 0,                  playback_state_end  = 0,
96                  playback_state_ram  = 1,                  playback_state_init = 1,
97                  playback_state_disk = 2                  playback_state_ram  = 2,
98                    playback_state_disk = 3
99              };              };
100    
101              // Attributes              // Attributes
# Line 111  namespace LinuxSampler { namespace gig { Line 109  namespace LinuxSampler { namespace gig {
109              float                       PitchBase;          ///< Basic pitch depth, stays the same for the whole life time of the voice              float                       PitchBase;          ///< Basic pitch depth, stays the same for the whole life time of the voice
110              float                       PitchBend;          ///< Current pitch value of the pitchbend wheel              float                       PitchBend;          ///< Current pitch value of the pitchbend wheel
111              ::gig::Sample*              pSample;            ///< Pointer to the sample to be played back              ::gig::Sample*              pSample;            ///< Pointer to the sample to be played back
             ::gig::Region*              pRegion;            ///< Pointer to the articulation information of the respective keyboard region of this voice  
112              ::gig::DimensionRegion*     pDimRgn;            ///< Pointer to the articulation information of current dimension region of this voice              ::gig::DimensionRegion*     pDimRgn;            ///< Pointer to the articulation information of current dimension region of this voice
113              playback_state_t            PlaybackState;      ///< When a sample will be triggered, it will be first played from RAM cache and after a couple of sample points it will switch to disk streaming and at the end of a disk stream we have to add null samples, so the interpolator can do it's work correctly              playback_state_t            PlaybackState;      ///< When a sample will be triggered, it will be first played from RAM cache and after a couple of sample points it will switch to disk streaming and at the end of a disk stream we have to add null samples, so the interpolator can do it's work correctly
114              bool                        DiskVoice;          ///< If the sample is very short it completely fits into the RAM cache and doesn't need to be streamed from disk, in that case this flag is set to false              bool                        DiskVoice;          ///< If the sample is very short it completely fits into the RAM cache and doesn't need to be streamed from disk, in that case this flag is set to false
# Line 137  namespace LinuxSampler { namespace gig { Line 134  namespace LinuxSampler { namespace gig {
134              LFO<gig::VCAManipulator>*   pLFO1;              ///< Low Frequency Oscillator 1 (Amplification)              LFO<gig::VCAManipulator>*   pLFO1;              ///< Low Frequency Oscillator 1 (Amplification)
135              LFO<gig::VCFCManipulator>*  pLFO2;             ///< Low Frequency Oscillator 2 (Filter cutoff frequency)              LFO<gig::VCFCManipulator>*  pLFO2;             ///< Low Frequency Oscillator 2 (Filter cutoff frequency)
136              LFO<gig::VCOManipulator>*   pLFO3;              ///< Low Frequency Oscillator 3 (Pitch)              LFO<gig::VCOManipulator>*   pLFO3;              ///< Low Frequency Oscillator 3 (Pitch)
137                bool                        bLFO1Enabled;        ///< Should we use the Amplitude LFO for this voice?
138                bool                        bLFO2Enabled;        ///< Should we use the Filter Cutoff LFO for this voice?
139                bool                        bLFO3Enabled;        ///< Should we use the Pitch LFO for this voice?
140              Pool<Event>::Iterator       itTriggerEvent;      ///< First event on the key's list the voice should process (only needed for the first audio fragment in which voice was triggered, after that it will be set to NULL).              Pool<Event>::Iterator       itTriggerEvent;      ///< First event on the key's list the voice should process (only needed for the first audio fragment in which voice was triggered, after that it will be set to NULL).
141          //public: // FIXME: just made public for debugging (sanity check in Engine::RenderAudio()), should be changed to private before the final release          //public: // FIXME: just made public for debugging (sanity check in Engine::RenderAudio()), should be changed to private before the final release
142              Pool<Event>::Iterator       itKillEvent;         ///< Event which caused this voice to be killed              Pool<Event>::Iterator       itKillEvent;         ///< Event which caused this voice to be killed

Legend:
Removed from v.505  
changed lines
  Added in v.687

  ViewVC Help
Powered by ViewVC