mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Audio context this binding
This commit is contained in:
parent
66d8fdc2c2
commit
6c4844cb87
@ -86,7 +86,7 @@ export class Audio implements OptionHandler {
|
||||
}
|
||||
|
||||
|
||||
autoStart() {
|
||||
autoStart = () => {
|
||||
if (this.audioContext && !this.started) {
|
||||
this.samples = [];
|
||||
this.audioContext.resume();
|
||||
@ -94,14 +94,14 @@ export class Audio implements OptionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
start() {
|
||||
start = () => {
|
||||
if (this.audioContext) {
|
||||
this.samples = [];
|
||||
this.audioContext.resume();
|
||||
}
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
isEnabled = () => {
|
||||
return this.sound;
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ export class Audio implements OptionHandler {
|
||||
];
|
||||
}
|
||||
|
||||
setOption(name: string, value: boolean) {
|
||||
setOption = (name: string, value: boolean) => {
|
||||
switch (name) {
|
||||
case SOUND_ENABLED_OPTION:
|
||||
this.sound = value;
|
||||
|
Loading…
Reference in New Issue
Block a user