bitgapp / eqMac

macOS System-wide Audio Equalizer & Volume Mixer 🎧
https://eqmac.app
Apache License 2.0
5.67k stars 334 forks source link

Bug: Static noise appears over a long period of audio processing #224

Closed nodeful closed 4 years ago

nodeful commented 4 years ago

Issuehunt badges

Disclaimer: Please go through existing issues to avoid creating duplicates. If you found a similar issue please post a comment there. If you are uncertain your issue is related to others then create the issue. Obvious ignorance of this rule might get you blocked from posting new issues. Please tick the box below to show that you have followed the guideline.

Describe the bug Reported in issues: #36 #79 #152 #174 #180 #187 #199 #210

I (the developer) have never actually seen this problem occur to me, probably due to the specific hardware setup that I have. However, many users have reported and this is a critical issue to fix.

In #180 user @ekarlo have done a lot of work to mitigate the issue with the old eqMac2 release. Most likely issue relies in the Sampling Rate mismatch and the slow drift of the Ring Buffer when processing the audio.

Probably also related to the sync loss and audio latency added reported in: #118 #144 #212 Need to look into it more.

Steps to Reproduce Waiting for users to report their hardware setups to achieve a similar setup for reproduction.

Expected behaviour The Audio should stay clear no matter how long eqMac process is running for.

Setup information: Waiting for feedback from users about the setup that they use.


IssueHunt Summary #### [darrenw2112 darrenw2112](https://issuehunt.io/u/darrenw2112) has been rewarded. ### Backers (Total: $100.00) - [nodeful nodeful](https://issuehunt.io/u/nodeful) ($100.00) ### Submitted pull Requests - [#322 Updates For Static Issue](https://issuehunt.io/r/bitgapp/eqMac/pull/322) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/bitgapp/eqMac/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
nodeful commented 4 years ago

The bug is likely related to #225 and probably fixing one of these will fix the other.

mwmrshll commented 4 years ago

@nodeful, I'm getting this bug running through a Thunderbolt 3 port into a Caldigit TS3+ dock with speakers plugged into its 3.5mm jack. As others said on the previous issue, it goes away temporarily if I switch audio source away and then back to eqMac, and then returns after a couple of minutes.

NielsCodes commented 4 years ago

@nodeful I'm running into the same issue with my Revonext QT2S headphones, my KZ ZS10 Pro's and when I use my Bose QC 35 in wired mode. I might be wrong, but it seems like the issue gets worse (appears sooner, progresses quicker) when the bass levels are boosted significantly. I'm running a 2019 15" MacBook Pro.

nodeful commented 4 years ago

What Sample rate are you guys using on the output devices? You can find that in the Audio MIDI Setup.app on your mac

NielsCodes commented 4 years ago

eqMac is at 44.1K the rest is all at 48K

nodeful commented 4 years ago

What if you set everything to 44.1K before running eqMac?

rome3ro commented 4 years ago

I did that setting up to 44 before installing actually is happening anyway I'm using iTunes on Catalina and if you leave the music running it comes worse the noise

rome3ro commented 4 years ago

Switching between output the noise go away immediately however after a while comes again

rome3ro commented 4 years ago

Maybe I'm wrong but on eqmac2 I could it switch on the mac (top bar -> sound icon) switch between output with this new version I can do it but after select for example from "eqmac" option to "Macbook Pro Speakers" nothing sounds even if I increase the volume, not sure if this is a bug or not, but as I said on previous version I was able to do that and the sound coming out from the selection

NielsCodes commented 4 years ago

@nodeful Tried switching to 44.1K before starting eqMac. Same issue still appeared after a while, although the crackling seemed to be of a higher frequency, although that might be unrelated. Let me know if there's anything else I can try or if there's any info that would help you.

mwmrshll commented 4 years ago

Thanks for the response. I switched the speaker to 44.1k with Audio MIDI Setup. This seemed to help at first, but the problem came back (maybe it gained me an extra minute or so). I've noticed that eqMac is set at 44.1k (or 48k) 2 ch 32-bit float, while my speakers can only be set to 44.1k/48k 2 ch 16/24-bit integer. So could the problem arise as eqMac is trying to convert the float sound stream to int? (forgive me if I'm nowhere in the ballpark, not really my area!)

mwmrshll commented 4 years ago

Furthermore, when listening through my Sony WH-1000XM3 headphones, there is no static build up. The headphones' format is 48k 2 ch 32-bit float. Even with eqMac set to 44.1k 2 ch 32-bit float, it works fine. So the issue only seems to arise with the float/int difference.

kimbeejay commented 4 years ago

Same here as @NielsKersic has described

isdaves commented 4 years ago

Experiencing the same symptoms on a MBP 15" 2018 on Mojave, using the integrated speakers of my external LG display (connected via HDMI to Thunderbold3 port)

Output devices:

As others mentioned, it goes away if I switch sources. Also, this never happened to me with eqMac2, which I was using up until now.

nodeful commented 4 years ago

I have just release a new version v0.1.0 where I tried to mitigate the issue. Could you please download the latest version from https://eqmac.app or GitHub, or update directly from the app. Test and report back!

jeffstampes commented 4 years ago

It's more stable...I used to only get 60-90 minutes, this time I made it almost 4 hours. When the sound got bad it got REALLY bad, but a quick toggle of outputs restored it. So an improvement I think

MrSpethial commented 4 years ago

I've tried installing the new version, I'm now getting no audio output at all (While the app is running).

Audio works fine when EQ is closed.

2018 Macbook pro 13 -> Inbuilt speakers -> Spotify.

isdaves commented 4 years ago

The new one crashes for me upon launching it (OS Version: Mac OS X 10.14.6 (18G3020))

[04/29 13:33:36 @ ~] /Applications/eqMac.app/Contents/MacOS/eqMac
2020-04-29 13:33:39.758 eqMac[19939:62538] Sentry Started -- Version: 4.5.0
dyld: lazy symbol binding failed: Symbol not found: _objc_opt_class
  Referenced from: /Applications/eqMac.app/Contents/MacOS/../Frameworks/WebViewJavascriptBridge.framework/Versions/A/WebViewJavascriptBridge (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_opt_class
  Referenced from: /Applications/eqMac.app/Contents/MacOS/../Frameworks/WebViewJavascriptBridge.framework/Versions/A/WebViewJavascriptBridge (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib

ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (ipc/send) invalid destination port
ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (ipc/send) invalid destination port
Abort trap: 6

Tried running the previous v0.0.1 (reported as v4.4.0 in CLI) and it also crashes now :(

[04/29 13:35:22 @ ~] /Applications/eqMac.app/Contents/MacOS/eqMac
2020-04-29 13:35:24.452 eqMac[20571:64943] Sentry Started -- Version: 4.4.0
ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (ipc/send) invalid destination port
ERROR: SentryCrashCPU.c (58): _Bool sentrycrashcpu_i_fillState(const thread_t, const thread_state_t, const thread_state_flavor_t, const mach_msg_type_number_t): thread_get_state: (ipc/send) invalid destination port
2020-04-29 13:35:25.138 eqMac[20571:64943] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'
*** First throw call stack:
<snip>
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
rome3ro commented 4 years ago

I've tried installing the new version, I'm now getting no audio output at all (While the app is running).

Audio works fine when EQ is closed.

2018 Macbook pro 13 -> Inbuilt speakers -> Spotify.

@MrSpethial Check on Audio Midi Setup on Mac that the other audios has 44.1 k configured instead 48

kesarion commented 4 years ago

Also crashes for me, MacOS 10.14.6. Old version as well (0.0.1). I tried removing all traces of the app and the driver, but still nothing on reinstall.

nodeful commented 4 years ago

@kesarion so before the update, the old build 0.0.1 was fine and now after the update even it is crashing? 🤔

nodeful commented 4 years ago

Btw the new Build should have no issues handling any sample rate. The driver will adapt to any Sample Rate set on your output device. The crashes after the update are related to some other issues not connected to this one.

kesarion commented 4 years ago

@nodeful No, it started happening with 0.0.1. I reinstalled it multiple times (along with the driver), because I was having this buzzing issue. At some point I thought I'd try one more time after setting the speaker output bit rate to 44.1 kHz and it didn't open anymore after that, not even after a couple of reinstalls, not even after setting the output back to 48.0 kHz. Something permanent happened and I don't know what, nor how to reset it without reinstalling the system.

The difference with the new 0.1.0 is that MacOS actually tells me the app crashed with the Send Report message; before, it would crash silently, no message, it wouldn't even get there.

nodeful commented 4 years ago

The buzzing and app crashing can't be related at all. Please send crash logs so I can point you to the right issue @kesarion

nodeful commented 4 years ago

Whoever has problems running v0.1.0 please download the pre-release of v0.1.1 here: https://github.com/bitgapp/eqMac/releases/tag/v0.1.1

kesarion commented 4 years ago

@nodeful Wow, it's no longer crashing! The app launches fine.

I let some audio play for a while and it does still start buzzing after a while. It did take longer though (2-3 minutes vs less than 1 before), and this time it was very abrupt and more like buzzing than the weird warbling before.

I tried switching between the speakers and eqMac in the status bar and then it finally crashed. It opens up again just fine, though, so that's a plus.

kesarion commented 4 years ago

It's too bad I only have 16 and 24 bit integer options for my speakers, while eqMac is strictly 32 bit float, so no way of checking if having them in the same format works on my side.

nodeful commented 4 years ago

Just curious how many people have tried to decrease the global EQ gain and increasing their overall volume. Like this: image As you can see I'm running a USB DAC with 48kHZ 16bit Int Channel and my sounds is bassy and super clear, no static. Try to play with global gain, if you have "fixed" your static noise that means it was never broken, just a hard limit of your Audio Hardware. This probably won't solve most people's issues but some for sure.

MrSpethial commented 4 years ago

Eqmac_Error_On_Installation.txt

Whoever has problems running v0.1.0 please download the pre-release of v0.1.1 here: https://github.com/bitgapp/eqMac/releases/tag/v0.1.1

I got the attached error after installing (Same issue no sound). Steps:

  1. Uninstalled using the app uninstall.
  2. Installed the new version (attached error)
  3. No sound when the app is open (Even when disabling the on/off button)
rome3ro commented 4 years ago

Just curious how many people have tried to decrease the global EQ gain and increasing their overall volume. Like this: image As you can see I'm running a USB DAC with 48kHZ 16bit Int Channel and my sounds is bassy and super clear, no static. Try to play with global gain, if you have "fixed" your static noise that means it was never broken, just a hard limit of your Audio Hardware. This probably won't solve most people's issues but some for sure.

@nodeful How did you get 48 working because on my environment switching to 48 instead 44 when I open the app is just muted!

mwmrshll commented 4 years ago

I installed the new version. With my same setup I described before, I had the issue arise again, perhaps more abruptly.

migdea11 commented 4 years ago

I have been running into the same issue, but when I installed the fix mentioned in this thread the issue went away. https://github.com/bitgapp/eqMac/issues/180 Hopefully this helps identify the issue because, I can't install the 3rd party fix on my work laptop, since it not from a known developer.

JohnStarich commented 4 years ago

I see this one's particularly hard to pin down. Hopefully my below hardware config + data will help a bit 🙏

eqMac: UI Version: 0.1.0 App Version: 0.1.1 macOS: Catalina 10.15.4 (19E287) machine: MacBook Pro (15-inch, 2016) audio setup:

TB3 dock with headphone jack
format: 2ch 16-bit Integer 48.0 kHz  <>

eqMac
format: 48,000 Hz  <>  2ch 32-bit Float

Something I noticed was the regularity in my speakers beginning to buzz. I timed it for several runs, where each time I clicked the audio output device (plugable audio out) to reset the buzz. If it helps, I was streaming music the whole time.

Turns out, the times were pretty consistent, around 57m:

57m34s
58m2s
55m39s

Perhaps there's some state that loses precision around 1hr of audio into use?

nadstaky commented 4 years ago

Hello Roman,

Installed latest version 0.1.1. (macOS Catalina 10.15.4, 2019 15" MBP with Core i9, 16 GB RAM). Sound still crackles and distorts when playing through my USB DAC, then no audio at all (Advance Paris Smart DX1).

Please fix this as soon as possible, as I can't test v0.1.1, it's unusable...

Best, Eric

jeffconsi commented 4 years ago

Hello Roman,

Quickly, thank you so much for your work from us users with hearing impairments. I am enjoying music even more now.

I am also having this crackling to no-sound issue using a USB DAC. Happened twice so far after 20-30mins of playback. Clicking the "Reset playback" button fixes the issue. I'm removing the DAC and testing the MacBook soundcard directly now. Will write back if any issues with that. Thanks again.

jeffconsi commented 4 years ago

Hi Roman, this issue persists with the internal Mac soundcard as well. Crackling static to no sound at all within about 20-30mins of playback. Reset playback fixes the issue, but I guess it still needs to be addressed.

JohnStarich commented 4 years ago

For what it's worth, the buzz seems to start at a specific time into playback. It doesn't appear to gradually increase throughout, just kicks in at about 57m, then gradually increases until music is drowned out.

Is there a way I can collect these logs to help diagnose? https://github.com/bitgapp/eqMac/blob/fda5238c544785bcee1098727478970e14297aa6/native/app/Source/Audio/Outputs/Output.swift#L102 I looked through Console.app, but I'm not seeing this particular line for process:eqMac

jeffstampes commented 4 years ago

Quickly, thank you so much for your work from us users with hearing impairments. I am enjoying music even more now.

And in addition, there are co-workers I can't understand over videoconference because they have such low voices and mics with poor high end. I have programs now with their names, and I flip over when they start talking. So it makes me more productive as well.

Thanks for your effort on this issue!!

austinbutler commented 4 years ago

Another data point here: AudioQuest DragonFly Black, by default was running at 96,000 Hz, 24-bit integer and sound starts to distort within 30s. Eventually drops out completely. Tried setting both the DAC and eqMac to 44.1, same issue pretty much. macOS 10.15.4.

fbcd4f50ea5350f051450323b5abfd0b commented 4 years ago

Same here with a Dragonfly Red on 44.1. I've created a short video with the noise. I can share it if that's of any help.

EDIT Sorry, I forgot to mention that it's also a Macbook Pro with 10.15.4

brandonkboswell commented 4 years ago

I am also getting the same on a 15in, 2018 Macbook running Catalina 10.15.4 into a Schiit Fulla

jeffconsi commented 4 years ago

Hi. I downloaded your latest version 0.2.0 and this issue still persists. I love the updates to the UI and the sound is still excellent. Just after 20-30mins it starts to distort and gets worse until it just cuts out altogether after about 30-60secs. I have a fairly new/powerful machine, so not sure why this is happening. The machine should be able to handle some EQ. I am running Catalina 10.15.4 into Drangonfly, but this is also happening with the built-in soundcard/headphone jack.

IDAK125 commented 4 years ago

Hello. I ran into the same static/choppy sound with 0.2.0 (as with the previous release). However, I find it happens within almost half the time now. With v0.1.1, it was averaging around 20-25 minutes. With 0.2.0 it's averaging around 10-12 minutes. In addition, I find the timing still occurs with or without sound going through the outputs during that time. After enough time, all sound is unresponsive (including system sounds)

Here are the stats: MacMini 8,1 - i7, 32GB RAM Audio through the built-in headphone jack Audio MIDI Setup: 44.1 on both eqMac, Headphone, Built-in Speaker.

Hope this helps.

jeffconsi commented 4 years ago

Yes. @IDAK125 I am experiencing the same issue too. If I leave the machine and come back, all sound is unresponsive including system sounds. @nodeful is this something you are finding too? Hopefully can be fixed for next version release. Thank you for this great app by the way.

0xKaizen commented 4 years ago

Hello. I ran into the same static/choppy sound with 0.2.0 (as with the previous release). However, I find it happens within almost half the time now. With v0.1.1, it was averaging around 20-25 minutes. With 0.2.0 it's averaging around 10-12 minutes. In addition, I find the timing still occurs with or without sound going through the outputs during that time. After enough time, all sound is unresponsive (including system sounds)

Here are the stats: MacMini 8,1 - i7, 32GB RAM Audio through the built-in headphone jack Audio MIDI Setup: 44.1 on both eqMac, Headphone, Built-in Speaker.

Hope this helps.

I have exactly the same issue here, it always occurs around every 15 minutes, even when no audio is running on the device. It forces me to quit and run again eqmac to fix the static noise for 15 more minutes. Hope it'll be fixed soon.

nodeful commented 4 years ago

Hey everyone, I know this bug is very annoying for a lot of you but again I cannot debug the issue as it never happened to me yet. The difference in macOS versions and Hardware setups will make this one hard to debug. As eqMac works for 90%-95% of the users without this issue I'm focusing on other things at the minute that will make eqMac more sustainable long term. When the time comes I will definitely fix this issue as it seems very important for a good user experience for everyone. Btw, you don't have to restart the app to fix this, I've added a Reset Playback button to the left of the Output Device selection box, just click that and it should mitigate the issue for some time. Thank you all!

nodeful commented 4 years ago

Maybe some other developer comes along like @ekarlo or somebody as brilliant and will fix the issue! I will try and setup an Issue Bounty for this one!

IssueHuntBot commented 4 years ago

@nodeful has funded $100.00 to this issue.


JohnStarich commented 4 years ago

@nodeful Thanks for your update!

Would you mind pointing me to how to access eqMac’s logs like in this comment? https://github.com/bitgapp/eqMac/issues/224#issuecomment-627104245

It could be very useful in helping us dig deeper into the underlying cause.

nodeful commented 4 years ago

@JohnStarich yeah those console logs only get logged during Debug runtime environment. So one would have to run the app from Xcode. I will improve the developer documentation shortly!