From 7754a51de475bf6093d9fff0232c0d0f4ab7d161 Mon Sep 17 00:00:00 2001 From: Eris Lund <38136789+0x5066@users.noreply.github.com> Date: Sat, 29 Nov 2025 01:44:30 +0100 Subject: [PATCH] Fix the oscilloscope having the incorrect polarity --- packages/webamp/js/components/VisPainter.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/webamp/js/components/VisPainter.ts b/packages/webamp/js/components/VisPainter.ts index edb0540a7..7600661dc 100644 --- a/packages/webamp/js/components/VisPainter.ts +++ b/packages/webamp/js/components/VisPainter.ts @@ -673,6 +673,13 @@ export class WavePaintHandler extends VisPaintHandler { // y is then adjusted downward to be in the center of the scope y = Math.round((y / 16) * 2) - 9; + // this sucks + // the way i'm getting the data in the first place makes it difficult to properly re-massage + // if getByteTimeDomainData was perfectly at 0 and we had to deal with signed/unsigned conversion + // i wouldn't have to do this... + // note to self: rejig this with getFloatTimeDomainData later + y = -y+14; + // adjusts the center point of y if we are in windowShade mode, and if pixelDensity is 2 // where it's adjusted further to give you the fullest view possible in that small window // else we leave y as is