Skip to content
Snippets Groups Projects
Verified Commit b2242b2e authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: new default variables for sound delay

parent 7894b8c1
No related branches found
No related tags found
1 merge request!19Initial tentative audio support 🔉
Pipeline #2277 failed
......@@ -346,7 +346,7 @@ export class GameboyEmulator extends EmulatorBase implements Emulator {
// some sync, this is required because of time hogging
const audioCurrentTime = this.audioContext.currentTime;
if (
this.nextPlayTime > audioCurrentTime + 0.05 ||
this.nextPlayTime > audioCurrentTime + 0.25 ||
this.nextPlayTime < audioCurrentTime
) {
// @TODO: this is tricky as it cancels most of the code
......@@ -355,7 +355,7 @@ export class GameboyEmulator extends EmulatorBase implements Emulator {
chunk.source.stop();
});
this.audioChunks = [];
this.nextPlayTime = audioCurrentTime;
this.nextPlayTime = audioCurrentTime + 0.1;
}
const source = this.audioContext.createBufferSource();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment