--- linuxsampler/trunk/src/Sampler.cpp 2007/12/03 23:22:02 1540 +++ linuxsampler/trunk/src/Sampler.cpp 2007/12/04 18:09:26 1541 @@ -340,6 +340,20 @@ } } + void Sampler::AddTotalStreamCountListener(TotalStreamCountListener* l) { + llTotalStreamCountListeners.AddListener(l); + } + + void Sampler::RemoveTotalStreamCountListener(TotalStreamCountListener* l) { + llTotalStreamCountListeners.RemoveListener(l); + } + + void Sampler::fireTotalStreamCountChanged(int NewCount) { + for (int i = 0; i < llTotalStreamCountListeners.GetListenerCount(); i++) { + llTotalStreamCountListeners.GetListener(i)->TotalStreamCountChanged(NewCount); + } + } + void Sampler::AddTotalVoiceCountListener(TotalVoiceCountListener* l) { llTotalVoiceCountListeners.AddListener(l); } @@ -548,6 +562,17 @@ return pDevice; } + int Sampler::GetDiskStreamCount() { + int count = 0; + std::set::iterator it = EngineFactory::EngineInstances().begin(); + + for(; it != EngineFactory::EngineInstances().end(); it++) { + count += (*it)->DiskStreamCount(); + } + + return count; + } + int Sampler::GetVoiceCount() { int count = 0; std::set::iterator it = EngineFactory::EngineInstances().begin();