enable audio cues to be played in parallel when playAudioCues is called (#173326)

fix #172523
This commit is contained in:
Megan Rogge 2023-02-03 11:23:12 -06:00 committed by GitHub
parent 6cb34eb223
commit 3e43792fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ export class AudioCueService extends Disposable implements IAudioCueService {
public async playAudioCues(cues: AudioCue[]): Promise<void> {
// Some audio cues might reuse sounds. Don't play the same sound twice.
const sounds = new Set(cues.filter(cue => this.isEnabled(cue)).map(cue => cue.sound));
await Promise.all(Array.from(sounds).map(sound => this.playSound(sound)));
await Promise.all(Array.from(sounds).map(sound => this.playSound(sound, true)));
}
private getVolumeInPercent(): number {