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:
@@ -230,7 +230,7 @@ export class GameBoyPlayer {
|
||||
*/
|
||||
stop(): void {
|
||||
this.isPlaying = false;
|
||||
this.apu.reset();
|
||||
this.apu.stopAll();
|
||||
console.log('Playback stopped');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user