25 |
|
|
26 |
#include "Sampler.h" |
#include "Sampler.h" |
27 |
|
|
28 |
|
#include "engines/EngineFactory.h" |
29 |
#include "engines/EngineChannelFactory.h" |
#include "engines/EngineChannelFactory.h" |
30 |
#include "drivers/audio/AudioOutputDeviceFactory.h" |
#include "drivers/audio/AudioOutputDeviceFactory.h" |
31 |
#include "drivers/midi/MidiInputDeviceFactory.h" |
#include "drivers/midi/MidiInputDeviceFactory.h" |
312 |
|
|
313 |
// destroy and free device from memory |
// destroy and free device from memory |
314 |
delete pDevice; |
delete pDevice; |
315 |
|
|
316 |
|
break; |
317 |
} |
} |
318 |
} |
} |
319 |
} |
} |
334 |
|
|
335 |
// destroy and free device from memory |
// destroy and free device from memory |
336 |
delete pDevice; |
delete pDevice; |
337 |
|
|
338 |
|
break; |
339 |
} |
} |
340 |
} |
} |
341 |
} |
} |
355 |
return pDevice; |
return pDevice; |
356 |
} |
} |
357 |
|
|
358 |
|
int Sampler::GetVoiceCount() { |
359 |
|
int count = 0; |
360 |
|
std::set<Engine*>::iterator it = EngineFactory::EngineInstances().begin(); |
361 |
|
|
362 |
|
for(; it != EngineFactory::EngineInstances().end(); it++) { |
363 |
|
count += (*it)->VoiceCount(); |
364 |
|
} |
365 |
|
|
366 |
|
return count; |
367 |
|
} |
368 |
|
|
369 |
void Sampler::Reset() { |
void Sampler::Reset() { |
370 |
// delete sampler channels |
// delete sampler channels |
371 |
try { |
try { |