Simplify audio chain - bypass all effects to fix distortion

- Bypass colorizer entirely (master -> destination directly)
- Remove wave channel lowpass filter
- Clean, direct audio path with no processing
- Should eliminate all distortion artifacts
This commit is contained in:
b1rdmania
2026-01-20 19:58:54 +00:00
parent 6dec8bf7cd
commit 5b294f2e5a
2 changed files with 7 additions and 17 deletions
+4 -5
View File
@@ -77,19 +77,18 @@ export class GameBoyAPU {
this.audioContext = audioContext || new AudioContext();
this.config = { ...DEFAULT_V2_CONFIG, ...config };
// Create colorizer with DMG preset for authentic sound
// Create colorizer (but don't use it for now - bypassed)
this.colorizer = new GameBoyColorizer(
this.audioContext,
GameBoyColorizer.createPreset('dmg')
GameBoyColorizer.createPreset()
);
// Create master gain
this.masterGain = this.audioContext.createGain();
this.masterGain.gain.value = this.config.masterVolume;
// Wire: master -> colorizer -> destination
this.masterGain.connect(this.colorizer.getInput());
this.colorizer.getOutput().connect(this.audioContext.destination);
// SIMPLIFIED: master -> destination (bypass colorizer to avoid distortion)
this.masterGain.connect(this.audioContext.destination);
// Initialize all channels
this.initializeChannels();