fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

OH MY FUCKING GOD.

Pictured: Apple's M2 MacBook Air 13" speaker response (measured with a mic), and the response you get when you zero out every 128th sample of a sine sweep.

They have a stupid off-by-one bug in the middle of their bass enhancer AND NOBODY NOTICED NOR FIXED IT IN OVER A YEAR.

So instead of this (for a 128-sample block size):

for (int sample = 0; sample <= 127; sample++)
// process sample

They did this:

for (int sample = 0; sample < 127; sample++)
// process sample

Legendary audio engineering there Apple.

We can now, very confidently say the audio quality of Asahi Linux will be better than Apple's. Because we don't have blatant, in your face off-by-one bugs in our DSP and we actually check the output to make sure it's good 😂

FFS, and people praise them for audio quality. I get it, the bar is so low it's buried underground for just about every other laptop, but come on...

Edit: replaced gif with video because Mastodon is choking on the animation duration...

Edit 2: Update below; I can repro this across a large range of versions on this machine but none of the other models I've tried so far. It is definitely a bug, very very obvious to the ear, and seems unique to this machine model.

Edit 3: Still there in Sonoma, this is a current bug.

@marcan HTH did you figure out that was the reason for the distortion?

@penguin42 The train of thought was:

  • The aliasing is every 375 Hz
  • 48000 / 375 = 128 so this is some fourier thing with a block size 128???
  • Wait no, this could be time domain, aliasing like that is what you get when you upsample without lowpassing
  • Specifically, when you upsample with zero-sample padding (standard), that is, when one sample out of 128 has the low frequency content.
  • So this is like taking the average of a 128-sample block and adding it to just one sample?
  • Wait, isn't that almost equivalent to zeroing out one sample?

numpy time

fs, signal = wavfile.read("sweep.wav")
signal[::128] = 0
wavfile.write("lol.wav", fs, signal)

And the rest is history.

Rickyx

@marcan @penguin42 do you think this bug will affect also external audio interfaces?

@rickyx @penguin42 No, this is strictly about internal speaker DSP.