M2 MacBook Air has audio bug, Apple notified. WARNING loud audio at end

3 years ago by octalfudge to c/apple_enthusiast

Attached: 1 video Tested 12.4 and 13.5 on M2 MBA, sounds just as bad, so this has been going on for a *long* time now. M1 MBA does not have this problem, nor does M1 MBP 16". This might be an M2 MBA specific problem. It is very, *very* obvious if you just play a 300Hz sine with any random frequency generator website and crank the volume up. Upgrading to Sonoma now, but I doubt they fixed it... it seems this has *always* been broken on at least the M2 13" MBA. Edit: Still there in Sonoma.
towerful 11 points 3 years ago

They go on to deduce it's an off-by-one error in the time domain.
So instead of 0-127 it's processing 0-126 samples (a classing i < 127 instead of i <= 127 in a for loop)

https://social.treehouse.systems/...

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.

Edit:
Stupid less-than symbol getting html-coded

path: 0 4120619, hotness: undefined, score: 11, children: 0
AnOceanAppears 8 points 3 years ago

I get that this is a bug, but it kinda sucks that people feel it's all right to act this way. Software is hard and unless you're using a language with zero-overhead iteration you're probably writing your drivers in C and iterating with a for-loop like our ancestors did. Off by one errors are stupidly common and everyone is human.

I mean, fuck mega corporations. This is still cringeworthy.

That being said, it's going to be fun to see quality differences in these operating systems in a few years because, as far as I know, Apple would rather force Swift into the systems-level language space than adopt a memory-safe language today.

Meanwhile Microsoft, Google, and Amazon, etc are all investing heavily in Rust by integrating it into their platforms.

path: 0 4133474, hotness: undefined, score: 8, children: 0
apple_enthusiast
apple_enthusiast

@lemmy.world

login for more options
20866
1811
343
Welcome

to the largest Apple community on Lemmy. This is the place where we talk about everything Apple, from iOS to the exciting upcoming Apple Vision Pro. Feel free to join the discussion!

Rules:
  1. No NSFW Content
  2. No Hate Speech or Personal Attacks
  3. No Ads / Spamming
    Self promotion is only allowed in the pinned monthly thread

Lemmy Code of Conduct

Communities of Interest:

Apple Hardware
Apple TV
Apple Watch
iPad
iPhone
Mac
Vintage Apple

Apple Software
iOS
iPadOS
macOS
tvOS
watchOS
Shortcuts
Xcode

Community banner courtesy of u/Antsomnia.

go to feed...