Skip to content

Commit

Permalink
aloha
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsuki105 committed Nov 16, 2024
1 parent 401d94c commit e465b92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Binary file modified docs/core.wasm
Binary file not shown.
4 changes: 4 additions & 0 deletions src/ebi/emu.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ func (e *Emu) setTurbo(speed int) {

func (e *Emu) enableSound(enabled bool) {
e.queueTask(func() {
prev := e.soundEnabled
e.soundEnabled = enabled
if prev != enabled {
e.sampleBuffer.Reset()
}
})
}

Expand Down
1 change: 1 addition & 0 deletions src/ebi/emu_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func loadROM(this js.Value, args []js.Value) any {
raw := args[0]
rom := make([]uint8, raw.Get("length").Int())
js.CopyBytesToGo(rom, raw)
emu.soundEnabled = true
emu.LoadROM(rom)
emu.c.Reset(false)
}
Expand Down

0 comments on commit e465b92

Please sign in to comment.