diff --git a/task-launcher/src/tasks/shared/helpers/audioHandler.ts b/task-launcher/src/tasks/shared/helpers/audioHandler.ts index 004c3d30..b66b8d19 100644 --- a/task-launcher/src/tasks/shared/helpers/audioHandler.ts +++ b/task-launcher/src/tasks/shared/helpers/audioHandler.ts @@ -40,9 +40,9 @@ export class PageAudioHandler { PageAudioHandler.audioUri = audioUri; - // mute audio if it has already been played twice + // replace audio with ding if it has already been played twice if (PageAudioHandler.replays >= maxRepetitions) { - audioUri = mediaAssets.audio.nullAudio; + audioUri = mediaAssets.audio.inputAudioCue; } try { diff --git a/task-launcher/src/tasks/shared/helpers/handlePracticeButtons.ts b/task-launcher/src/tasks/shared/helpers/handlePracticeButtons.ts index 7bc8d002..072cc36f 100644 --- a/task-launcher/src/tasks/shared/helpers/handlePracticeButtons.ts +++ b/task-launcher/src/tasks/shared/helpers/handlePracticeButtons.ts @@ -64,9 +64,17 @@ function handlePracticeButtonPress( incorrectPracticeResponses.push(choice); taskStore('incorrectPracticeResponses', incorrectPracticeResponses); } + + const feedbackAudioConfig: AudioConfigType = { + restrictRepetition: { + enabled: false, + maxRepetitions: 2, + }, + }; + // if there is audio playing, stop it first before playing feedback audio to prevent overlap between trials PageAudioHandler.stopAndDisconnectNode(); - PageAudioHandler.playAudio(feedbackAudio); + PageAudioHandler.playAudio(feedbackAudio, feedbackAudioConfig); } const getKeyboardChoices = (itemConfig: LayoutConfigType) => {