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

Diff of /linuxsampler/trunk/src/engines/EngineChannel.cpp

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

revision 1297 by iliev, Thu Aug 16 15:55:21 2007 UTC revision 1789 by iliev, Sat Nov 1 19:01:27 2008 UTC
# Line 25  Line 25 
25    
26  #include <algorithm>  #include <algorithm>
27    
28    #include "../Sampler.h"
29    #include "../common/global_private.h"
30  #include "../drivers/midi/MidiInstrumentMapper.h"  #include "../drivers/midi/MidiInstrumentMapper.h"
31    
32  #define NO_MIDI_INSTRUMENT_MAP          -1  #define NO_MIDI_INSTRUMENT_MAP          -1
# Line 40  namespace LinuxSampler { Line 42  namespace LinuxSampler {
42          uiMidiProgram = 0;          uiMidiProgram = 0;
43          bProgramChangeReceived = bMidiBankMsbReceived = bMidiBankLsbReceived = false;          bProgramChangeReceived = bMidiBankMsbReceived = bMidiBankLsbReceived = false;
44          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;          iMidiInstrumentMap = NO_MIDI_INSTRUMENT_MAP;
45          uiVoiceCount = 0;          SetVoiceCount(0);
46          uiDiskStreamCount = 0;          SetDiskStreamCount(0);
47            pSamplerChannel = NULL;
48          ResetMidiRpnController();          ResetMidiRpnController();
49      }      }
50    
# Line 188  namespace LinuxSampler { Line 191  namespace LinuxSampler {
191      }      }
192    
193      uint EngineChannel::GetVoiceCount() {      uint EngineChannel::GetVoiceCount() {
194          return uiVoiceCount;          return atomic_read(&voiceCount);
195      }      }
196            
197      void EngineChannel::SetVoiceCount(uint Voices) {      void EngineChannel::SetVoiceCount(uint Voices) {
198          uiVoiceCount = Voices;          atomic_set(&voiceCount, Voices);
199      }      }
200    
201      uint EngineChannel::GetDiskStreamCount() {      uint EngineChannel::GetDiskStreamCount() {
202          return uiDiskStreamCount;          return atomic_read(&diskStreamCount);
203      }      }
204            
205      void EngineChannel::SetDiskStreamCount(uint Streams) {      void EngineChannel::SetDiskStreamCount(uint Streams) {
206          uiDiskStreamCount = Streams;          atomic_set(&diskStreamCount, Streams);
207        }
208        
209        SamplerChannel* EngineChannel::GetSamplerChannel() {
210            if(pSamplerChannel == NULL) {
211                std::cerr << "EngineChannel::GetSamplerChannel(): pSamplerChannel is NULL, this is a bug!\n" << std::flush;
212            }
213            return pSamplerChannel;
214        }
215    
216        void EngineChannel::SetSamplerChannel(SamplerChannel* pChannel) {
217            pSamplerChannel = pChannel;
218        }
219    
220        Sampler* EngineChannel::GetSampler() {
221            if (GetSamplerChannel() == NULL) return NULL;
222            return GetSamplerChannel()->GetSampler();
223      }      }
224    
225      void EngineChannel::AddFxSendCountListener(FxSendCountListener* l) {      void EngineChannel::AddFxSendCountListener(FxSendCountListener* l) {

Legend:
Removed from v.1297  
changed lines
  Added in v.1789

  ViewVC Help
Powered by ViewVC