mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 00:29:40 +02:00
Break out of double loop
This commit is contained in:
parent
0aafd23c7f
commit
7e8915fed8
1 changed files with 8 additions and 0 deletions
|
@ -198,15 +198,23 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(AudioMixerClientData* l
|
|||
attenuationCoefficient *= offAxisCoefficient;
|
||||
}
|
||||
|
||||
bool wantBreak = false;
|
||||
float attenuationPerDoublingInDistance = _attenuationPerDoublingInDistance;
|
||||
foreach (const QString& source, _attenuationCoefficients.keys()) {
|
||||
if (_audioZones[source].contains(streamToAdd->getPosition())) {
|
||||
foreach (const QString& listener, _attenuationCoefficients[source].keys()) {
|
||||
if (_audioZones[listener].contains(listeningNodeStream->getPosition())) {
|
||||
attenuationCoefficient = _attenuationCoefficients[source][listener];
|
||||
wantBreak = true;
|
||||
}
|
||||
if (wantBreak) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wantBreak) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (distanceBetween >= ATTENUATION_BEGINS_AT_DISTANCE) {
|
||||
|
|
Loading…
Reference in a new issue