Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions task-launcher/src/tasks/shared/helpers/audioHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 9 additions & 1 deletion task-launcher/src/tasks/shared/helpers/handlePracticeButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down