Skip to content

Commit

Permalink
remove the queue argument from Announcer.step, see #71
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 4, 2022
1 parent 74515c4 commit ddb6ac8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions js/Announcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import StringIO from '../../tandem/js/types/StringIO.js';
import { ResolvedResponse } from './ResponsePacket.js';
import Utterance from './Utterance.js';
import utteranceQueueNamespace from './utteranceQueueNamespace.js';
import UtteranceWrapper from './UtteranceWrapper.js';

type SelfOptions = {
respectResponseCollectorProperties?: boolean;
Expand Down Expand Up @@ -124,9 +123,8 @@ abstract class Announcer extends PhetioObject {
* Intended to be overridden by subtypes if necessary as a way to implement dynamic behavior of the Announcer.
*
* @param dt - in milliseconds
* @param queue
*/
step( dt: number, queue: UtteranceWrapper[] ) {}
step( dt: number ) {}

static AnnouncerIO = new IOType( 'AnnouncerIO', {
valueType: Announcer,
Expand Down
3 changes: 1 addition & 2 deletions js/SpeechSynthesisAnnouncer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import Announcer, { AnnouncerOptions } from '../../utterance-queue/js/Announcer.
import Utterance from '../../utterance-queue/js/Utterance.js';
import SpeechSynthesisParentPolyfill from './SpeechSynthesisParentPolyfill.js';
import utteranceQueueNamespace from './utteranceQueueNamespace.js';
import UtteranceWrapper from './UtteranceWrapper.js';
import { ResolvedResponse } from './ResponsePacket.js';

// If a polyfill for SpeechSynthesis is requested, try to initialize it here before SpeechSynthesis usages. For
Expand Down Expand Up @@ -279,7 +278,7 @@ class SpeechSynthesisAnnouncer extends Announcer {
this.initialized = true;
}

override step( dt: number, queue: UtteranceWrapper[] ): void {
override step( dt: number ): void {

// if initialized, this means we have a synth.
const synth = this.getSynth();
Expand Down
2 changes: 1 addition & 1 deletion js/UtteranceQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class UtteranceQueue extends PhetioObject {
}

// any specific updates that are managed by the announcer each step
this.announcer.step( dt, this.queue );
this.announcer.step( dt );
}

/**
Expand Down

0 comments on commit ddb6ac8

Please sign in to comment.