Skip to content

Instantly share code, notes, and snippets.

@stemmlerjs
Created April 6, 2019 17:13
Show Gist options
  • Select an option

  • Save stemmlerjs/1a428a45f6c0513dad8ecded3cbf3d2e to your computer and use it in GitHub Desktop.

Select an option

Save stemmlerjs/1a428a45f6c0513dad8ecded3cbf3d2e to your computer and use it in GitHub Desktop.
abstract class AudioDevice {
protected isPlaying: boolean = false;
protected currentTrack: ITrack = null;
constructor () {
}
play (track: ITrack) : void {
this.currentTrack = track;
this.isPlaying = true;
this.handlePlayCurrentAudioTrack();
}
abstract handlePlayCurrentAudioTrack () : void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment