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 |
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 |
|
|
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) { |