Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Synth Sounded Fine When Nobody Was Listening

This is my entry for DEV's Summer Bug Smash — Smash Stories. There is a specific kind of bug that makes you doubt your own ears. I had a browser-based audio engine that played fine in export and sounded broken in real time. Hit play, and the output was thin, muffled, strangled — like someone had thrown a blanket over the speakers. Hit "render to file" on the exact same project data , and the…

In a case of a browser-based audio engine that sounded muffled in real-time, but perfect when rendered to file, the issue stemmed from a difference in the code paths. The live playback path ran on a scheduler, while the offline render path had no scheduler. The scheduler created and destroyed audio nodes at a rate of roughly 6,636 times per short run, which was the actual source of the issue.

The scheduler had a lookahead window of 0.28 seconds and a seek detector that triggered when the user dragged the playhead backwards. The seek detector compared the current transport position against the position it last saw and canceled every scheduled voice if there was a backward seek. The scheduler's lookahead window caused a backwards gap, which triggered the seek detector, leading to a continuous cycle of cancellation and recreation of audio nodes.

The fix involved increasing the backward-seek threshold to be larger than the lookahead window, preventing the scheduler's forward progress from being mistaken for a user seek. This bug highlights the importance of comparing different code paths and counting occurrences to identify the root cause.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

7 JWT Security Mistakes I See in Almost Every Auth Implementation

Most JWT security problems don't come from a broken library. They come from a handful of small decisions made once during setup and never revisited: which algorithm to trust, where to store the token…

  • Trusting the algorithm header can lead to algorithm confusion attacks like "alg: none" bypass.
  • Storing tokens in localStorage exposes them to unauthorized access via scripts.
  • Skipping claim validation beyond signature checks leaves tokens unchecked for expiration and issuer.

One Extra Slash: Hunting a Windows Path Bug Down to a Single Formatter

This is my entry for DEV's Summer Bug Smash — Smash Stories. Not every good bug is an epic. Some of them are one character long, and the interesting part is entirely in the hunt.

  • Single extra slash in Windows file path caused by formatter
  • Bug missed initially due to no error in path handling
  • Issue identified by comparing raw bytes with processing code

More from Thursday 6 August →