mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-06-14 15:29:27 +00:00
recreate audio when resuming (https://goo.gl/7K7WLu)
This commit is contained in:
parent
af482b5fa6
commit
9de22d6389
|
@ -137,6 +137,8 @@ TODO:
|
||||||
- doesn't do clip right
|
- doesn't do clip right
|
||||||
- doesn't do b/w tint
|
- doesn't do b/w tint
|
||||||
- vcs
|
- vcs
|
||||||
|
- sound doesn't start on Chrome (https://goo.gl/7K7WLu)
|
||||||
|
- make start after clicking in embed
|
||||||
- vcs sound continues when paused
|
- vcs sound continues when paused
|
||||||
- vcs: INPTx needs to be added to control state
|
- vcs: INPTx needs to be added to control state
|
||||||
- vcs: break on # of lines changed (maybe using getRasterPosition?)
|
- vcs: break on # of lines changed (maybe using getRasterPosition?)
|
||||||
|
@ -178,6 +180,8 @@ TODO:
|
||||||
- SMS
|
- SMS
|
||||||
- can't step back twice?
|
- can't step back twice?
|
||||||
- compiler bug in chase
|
- compiler bug in chase
|
||||||
|
- "shared" in URL doesn't work, leave in URL? (also importURL)
|
||||||
|
- vicdual: delay is faster
|
||||||
|
|
||||||
|
|
||||||
WEB WORKER FORMAT
|
WEB WORKER FORMAT
|
||||||
|
|
14
src/audio.ts
14
src/audio.ts
|
@ -5,13 +5,19 @@ declare var MasterChannel, AudioLooper, PsgDeviceChannel;
|
||||||
|
|
||||||
export class MasterAudio {
|
export class MasterAudio {
|
||||||
master = new MasterChannel();
|
master = new MasterChannel();
|
||||||
looper = new AudioLooper(512);
|
looper;
|
||||||
start() {
|
start() {
|
||||||
this.looper.setChannel(this.master);
|
if (!this.looper) {
|
||||||
this.looper.activate();
|
this.looper = new AudioLooper(512);
|
||||||
|
this.looper.setChannel(this.master);
|
||||||
|
this.looper.activate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
this.looper.setChannel(null);
|
if (this.looper) {
|
||||||
|
this.looper.setChannel(null);
|
||||||
|
this.looper = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,8 @@ class VCSPlatform extends BasePlatform {
|
||||||
var self = this;
|
var self = this;
|
||||||
$("#javatari-div").show();
|
$("#javatari-div").show();
|
||||||
Javatari.start();
|
Javatari.start();
|
||||||
|
// for Chrome autostart
|
||||||
|
Javatari.room.speaker.powerOff();
|
||||||
// intercept clockPulse function
|
// intercept clockPulse function
|
||||||
Javatari.room.console.oldClockPulse = Javatari.room.console.clockPulse;
|
Javatari.room.console.oldClockPulse = Javatari.room.console.clockPulse;
|
||||||
Javatari.room.console.clockPulse = function() {
|
Javatari.room.console.clockPulse = function() {
|
||||||
|
@ -127,11 +129,10 @@ class VCSPlatform extends BasePlatform {
|
||||||
}
|
}
|
||||||
pause() {
|
pause() {
|
||||||
Javatari.room.console.pause();
|
Javatari.room.console.pause();
|
||||||
Javatari.room.speaker.mute();
|
|
||||||
}
|
}
|
||||||
resume() {
|
resume() {
|
||||||
Javatari.room.console.go();
|
Javatari.room.console.go();
|
||||||
Javatari.room.speaker.play();
|
Javatari.room.speaker.powerOn();
|
||||||
}
|
}
|
||||||
advance() {
|
advance() {
|
||||||
Javatari.room.console.clockPulse();
|
Javatari.room.console.clockPulse();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user