| void AudioLevelObserver::Update() | |
|---|---|
| { | |
| MS_TRACE(); | |
| std::map<int8_t, RTC::Producer*> mapDBovsProducer; | |
| for (auto& kv : this->mapProducerDBovs) | |
| { | |
| auto* producer = kv.first; | |
| auto& dBovs = kv.second; | |
| if (dBovs.count < 10) | |
| continue; | |
| auto avgDBov = -1 * static_cast<int8_t>(std::lround(dBovs.totalSum / dBovs.count)); | |
| if (avgDBov >= this->threshold) | |
| mapDBovsProducer[avgDBov] = producer; | |
| } |
Just a simple question about the following two lines:
if (avgDBov >= this->threshold)
mapDBovsProducer[avgDBov] = producer;
lets say if there are two producers with the same average volume number, the first added one will be overwritten by the second one, is this designated behavior?