340 |
} |
} |
341 |
} |
} |
342 |
|
|
343 |
|
void Sampler::AddTotalStreamCountListener(TotalStreamCountListener* l) { |
344 |
|
llTotalStreamCountListeners.AddListener(l); |
345 |
|
} |
346 |
|
|
347 |
|
void Sampler::RemoveTotalStreamCountListener(TotalStreamCountListener* l) { |
348 |
|
llTotalStreamCountListeners.RemoveListener(l); |
349 |
|
} |
350 |
|
|
351 |
|
void Sampler::fireTotalStreamCountChanged(int NewCount) { |
352 |
|
for (int i = 0; i < llTotalStreamCountListeners.GetListenerCount(); i++) { |
353 |
|
llTotalStreamCountListeners.GetListener(i)->TotalStreamCountChanged(NewCount); |
354 |
|
} |
355 |
|
} |
356 |
|
|
357 |
void Sampler::AddTotalVoiceCountListener(TotalVoiceCountListener* l) { |
void Sampler::AddTotalVoiceCountListener(TotalVoiceCountListener* l) { |
358 |
llTotalVoiceCountListeners.AddListener(l); |
llTotalVoiceCountListeners.AddListener(l); |
359 |
} |
} |
562 |
return pDevice; |
return pDevice; |
563 |
} |
} |
564 |
|
|
565 |
|
int Sampler::GetDiskStreamCount() { |
566 |
|
int count = 0; |
567 |
|
std::set<Engine*>::iterator it = EngineFactory::EngineInstances().begin(); |
568 |
|
|
569 |
|
for(; it != EngineFactory::EngineInstances().end(); it++) { |
570 |
|
count += (*it)->DiskStreamCount(); |
571 |
|
} |
572 |
|
|
573 |
|
return count; |
574 |
|
} |
575 |
|
|
576 |
int Sampler::GetVoiceCount() { |
int Sampler::GetVoiceCount() { |
577 |
int count = 0; |
int count = 0; |
578 |
std::set<Engine*>::iterator it = EngineFactory::EngineInstances().begin(); |
std::set<Engine*>::iterator it = EngineFactory::EngineInstances().begin(); |