Fix stop button - track and stop all active audio nodes

- Track all oscillators/sources in APU activeNodes Set
- Add stopAll() method that immediately stops all tracked nodes
- Auto-remove nodes from tracking when they end naturally
- GameBoyPlayer.stop() now calls apu.stopAll()
This commit is contained in:
b1rdmania
2026-01-20 19:45:08 +00:00
parent e22431164f
commit 7aa1d6f660
2 changed files with 43 additions and 4 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ export class GameBoyPlayer {
*/
stop(): void {
this.isPlaying = false;
this.apu.reset();
this.apu.stopAll();
console.log('Playback stopped');
}