mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
Merge pull request #185361 from microsoft/merogge/cue-touch-up
follow up cue work
This commit is contained in:
commit
af93ce2437
|
@ -53,6 +53,10 @@ export class AudioCueService extends Disposable implements IAudioCueService {
|
|||
await Promise.all(Array.from(sounds).map(sound => this.playSound(sound, true)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gaming and other apps often play a sound variant when the same event happens again
|
||||
* for an improved experience. This function plays a random sound from the given group to accomplish that.
|
||||
*/
|
||||
public playRandomAudioCue(groupId: AudioCueGroupId, allowManyInParallel?: boolean): void {
|
||||
const cues = AudioCue.allAudioCues.filter(cue => cue.groupId === groupId);
|
||||
const index = Math.floor(Math.random() * cues.length);
|
||||
|
@ -350,7 +354,7 @@ export class AudioCue {
|
|||
settingsKey: 'audioCues.chatRequestSent'
|
||||
});
|
||||
|
||||
public static readonly chatResponseReceived = {
|
||||
private static readonly chatResponseReceived = {
|
||||
name: localize('audioCues.chatResponseReceived', 'Chat Response Received'),
|
||||
settingsKey: 'audioCues.chatResponseReceived',
|
||||
groupId: AudioCueGroupId.chatResponseReceived
|
||||
|
|
Loading…
Reference in a new issue