Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static noise while running the app #2867

Closed
Giszmo opened this issue Jun 4, 2019 · 20 comments
Closed

Static noise while running the app #2867

Giszmo opened this issue Jun 4, 2019 · 20 comments

Comments

@Giszmo
Copy link

Giszmo commented Jun 4, 2019

When starting Bisq, I immediately get static noise on my headphones as soon as the UI becomes visible. On no other app do I get that. What is causing it? It feels almost like comfort noise on voip apps.

@ghost
Copy link

ghost commented Jun 4, 2019

In order for the Bisq appli to stay alive on certain machines/OS, the appli plays a sound at the minimum volume. See #1712
This is probably the explanation.

@Giszmo
Copy link
Author

Giszmo commented Jun 5, 2019

Sounds can be silent, too. Can we play silent.wav instead of staticnoise.wav? It's really annoying and if linux provides an alternative way, I'd really want that to get reverted. On OSX there is no server feature possible without static noise? Sounds ridiculous to me.

@Giszmo
Copy link
Author

Giszmo commented Jun 5, 2019

By the way, silent.aiff is 40MB of high fidelity stereo silence or why is it so big? If actual sound is required, how about 1 minute, mono 12Hz ogg? That would be 23kB.

@Giszmo
Copy link
Author

Giszmo commented Jun 5, 2019

silent.zip

for your consideration

@ghost
Copy link

ghost commented Jun 6, 2019

Thanks @gizmo for your inputs.
I think that devs are a bit busy atm. But we could see if it is possible to improve this hack.
Notice however that you are the 1st person in several months which reports this issue. So it may also be that there is something with your specific configuration.

@ManfredKarrer
Copy link
Contributor

@Giszmo You can deactivate it in Settings: Avoid standby mode - has only effect that the sound file is not played.
Or better make a PR to deactivate it for Linux.

@Giszmo
Copy link
Author

Giszmo commented Jun 7, 2019

@ManfredKarrer What about the file size? 40MB? Seriously? How did that ever get approved?

@HarryMacfinned in my experience, even serious bugs get reported by about 1% of the users only. If I wasn't so close with the project, I wouldn't have reported it.

So it may also be that there is something with your specific configuration.

Are you claiming that you do not hear that sound when you put on headphones at moderate volume? The choice of static noise for something meant to be inaudible is weird. White noise by definition contains all frequencies, including those the human is very sensitive to. Using the limits of the audible spectrum of 20-20k Hz, 20Hz or below is the better choice as depending on format and codec, 20kHz might result in lower frequency "noise" again. If 12Hz works for the task, even better as it's less data to encode and less audible than even 20Hz.

@a123b
Copy link
Contributor

a123b commented Jun 7, 2019

As you can just turn it off in the settings, it didn't bother me enough to open a ticket, but I have to agree with @Giszmo here. The file currently used for standby prevention is a pretty weird choice... it has:

  • 40 MiB file size, noise with -68.7 dB peak amplitude (and even some tag metadata?!)

In comparison, a mono 8000 Hz 16-bit WAV with 15 seconds of silence has:

  • 234 KiB file size, no noise whatsoever

A simple ffmpeg -i silent.wav silent.ogg yields an OGG with:

  • 28 KiB file size, noise with -71.2 dB peak amplitude

 
But the noise in the current file is so low I'd guess that the audible noise is rather coming from the audio hardware than the file itself... which would be audible even with the no-noise WAV file...
 

Edit:
Using the minimum bitrate (ffmpeg -i silent.wav -b:a 8k silent.ogg) gives an even better ogg:

  • 9 KiB file size, noise with -80.8 dB peak amplitude

@Giszmo
Copy link
Author

Giszmo commented Jun 7, 2019

But the noise in the current file is so low I'd guess that the audible noise is rather coming from the audio hardware than the file itself... which would be audible even with the no-noise WAV file...

I provided a zip file with a silent audio file. playing it in audacity is absolutely silent although the equalizer indicates -55dB. Playing the 40MB audio in audacity is giving me the same noise I get in bisq and the equalizer doesn't show me a reading at all.

@a123b
Copy link
Contributor

a123b commented Jun 7, 2019

Just tested "Avoid standby mode" with headphones on and can confirm that the noise is definitely very audible. I also noticed that Bisq's application volume is set to 100%. Manually changing it to 1% makes it inaudible. In addition to changing the file, maybe it would be a good idea to make Bisq set its own volume to 1% (or even 0%, if it still prevents the shutdown, then)

@MollyPolly
Copy link

Give back money to Monica, stolen from her using Mycelium wallet! This Alexander Kuzmenko - was in custody for stealing! He steals for same thieves like he is!! Don’t believe or work with Mycelium or Waves platform, it’s same Russian scam !

@sqrrm
Copy link
Member

sqrrm commented Jul 1, 2019

Agree that the noise it definitely audible. A smaller and silent .ogg file sounds like a better choice if someone feels like implementing. The only thing is to make sure it actually prevents sleep mode, I remember @ManfredKarrer mentioned there were some issues with some sound file and hence chose the monster we now have.

@ManfredKarrer
Copy link
Contributor

@sqrrm Yes it took me quite a bit of time for testing until it worked reliable. Using a silent sound did not work and also using short sounds had issues (started with that; but don't remember what it was exactly the problem with that approach). Testing it was pretty cumbersome as you need to wait until OS gets to sleep mode and wait a bit until resources get throttled and then wait for timeout.

Easiest path would be the reduce the volume if the existing sound and test if it still works. Bitrate could be reduced as well and mono can be used. Maybe using a very low frequency which most headsets don't reproduce might be another option, but needs to be tested if it still does its job. We got definitely less disputes with that fix. At least for OSX users we know it helped.

If there is a VM argument for telling the app in Linux to run as server that might be an option if that works reliable for Linux. Then the sound can be only used on OSX and Windows. Testing if it was an issue at all on Linux would be good as well.

It was not really tested on Windows. So if someone can do that would be good. Not sure if it was a OSX issue only.

But I would recommend to not remove it until its tested that it does not cause failed take-offer attempts if not playing.

The problem was that offers still stay online but when a user takes the offer a timeout gets triggered as the makers OS in sleep mode has throttled resources that much that it did not respond in time. The republishing of the offers though still worked. I did not find details information how OSX handled that and it has changed over the past years as it was never observed 2-3 years ago.

@keo-bisq
Copy link

keo-bisq commented Jul 2, 2019

Do not remove the sound unless you are ABSOLUTELY SURE that messages are not lost. Arbitration is simply impossible in such situations.

@stale
Copy link

stale bot commented Sep 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Sep 30, 2019
@stale
Copy link

stale bot commented Oct 7, 2019

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

@stale stale bot closed this as completed Oct 7, 2019
@mmortal03
Copy link

Is this not still relevant? I'm seeing it in the current version of the app on Windows. What would need to be tested on Windows, @ManfredKarrer ? You said, " Testing it was pretty cumbersome as you need to wait until OS gets to sleep mode and wait a bit until resources get throttled and then wait for timeout."

Is the sound what is theoretically keeping the OS from going to sleep? I can't imagine that Windows would require an audible sound to do this. How would Windows even know what is actually audible?

@mmortal03
Copy link

Is it to prevent the app being napped in OSX, or the actual OS going to sleep, or both? On Windows, at least, I know there's something called Power Throttling, but I don't know if it would apply to this issue.

@mmortal03
Copy link

I just realized that having "Loudness equalization" checked under the Windows Sound Control Panel -> Default playback device's properties -> Enhancements tab is what makes this static very audible. I would like to keep this setting checked on my laptop for sound loudness reasons, but, unfortunately it leads to this problem with Bisq.

@chimp1984
Copy link
Contributor

A new PR was just merged which reduced the sound level to the absolute minimum. Also reduce file size a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants