Skip to content

Commit b81fd85

Browse files
authored
Merge pull request microsoft#180713 from microsoft/merogge/cache
only cache audio cues, do not try to preload
2 parents 9b099b5 + ff83d0b commit b81fd85

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/vs/platform/audioCues/browser/audioCueService.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ export class AudioCueService extends Disposable implements IAudioCueService {
3737
@IAccessibilityService private readonly accessibilityService: IAccessibilityService
3838
) {
3939
super();
40-
// preload all sounds so there's no delay
41-
for (const audioCue of AudioCue.allAudioCues) {
42-
playAudio(FileAccess.asBrowserUri(
43-
`vs/platform/audioCues/browser/media/${audioCue.sound.fileName}`
44-
).toString(true), 0).then(sound => { { this.sounds.set(sound.src, sound); } });
45-
}
4640
}
4741

4842
public async playAudioCue(cue: AudioCue, allowManyInParallel = false): Promise<void> {
@@ -79,11 +73,9 @@ export class AudioCueService extends Disposable implements IAudioCueService {
7973
try {
8074
const sound = this.sounds.get(url);
8175
if (sound) {
82-
// preloaded
8376
sound.volume = this.getVolumeInPercent() / 100;
8477
await sound.play();
8578
} else {
86-
// not yet preloaded
8779
const playedSound = await playAudio(url, this.getVolumeInPercent() / 100);
8880
this.sounds.set(url, playedSound);
8981
}

0 commit comments

Comments
 (0)