33 |
#include "drivers/midi/MidiInputDeviceFactory.h" |
#include "drivers/midi/MidiInputDeviceFactory.h" |
34 |
#include "drivers/midi/MidiInstrumentMapper.h" |
#include "drivers/midi/MidiInstrumentMapper.h" |
35 |
#include "common/Features.h" |
#include "common/Features.h" |
36 |
|
#include "network/lscpserver.h" |
37 |
|
|
38 |
namespace LinuxSampler { |
namespace LinuxSampler { |
39 |
|
|
690 |
return Features::enableDenormalsAreZeroMode(); |
return Features::enableDenormalsAreZeroMode(); |
691 |
} |
} |
692 |
|
|
693 |
|
void Sampler::fireStatistics() { |
694 |
|
static const LSCPEvent::event_t eventsArr[] = { |
695 |
|
LSCPEvent::event_voice_count, LSCPEvent::event_stream_count, |
696 |
|
LSCPEvent::event_buffer_fill, LSCPEvent::event_total_voice_count |
697 |
|
}; |
698 |
|
static const std::list<LSCPEvent::event_t> events(eventsArr, eventsArr + 4); |
699 |
|
|
700 |
|
if (LSCPServer::EventSubscribers(events)) |
701 |
|
{ |
702 |
|
LSCPServer::LockRTNotify(); |
703 |
|
std::map<uint,SamplerChannel*> channels = GetSamplerChannels(); |
704 |
|
std::map<uint,SamplerChannel*>::iterator iter = channels.begin(); |
705 |
|
for (; iter != channels.end(); iter++) { |
706 |
|
SamplerChannel* pSamplerChannel = iter->second; |
707 |
|
EngineChannel* pEngineChannel = pSamplerChannel->GetEngineChannel(); |
708 |
|
if (!pEngineChannel) continue; |
709 |
|
Engine* pEngine = pEngineChannel->GetEngine(); |
710 |
|
if (!pEngine) continue; |
711 |
|
fireVoiceCountChanged(iter->first, pEngineChannel->GetVoiceCount()); |
712 |
|
fireStreamCountChanged(iter->first, pEngineChannel->GetDiskStreamCount()); |
713 |
|
fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); |
714 |
|
fireTotalStreamCountChanged(GetDiskStreamCount()); |
715 |
|
fireTotalVoiceCountChanged(GetVoiceCount()); |
716 |
|
} |
717 |
|
LSCPServer::UnlockRTNotify(); |
718 |
|
} |
719 |
|
} |
720 |
|
|
721 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |