-
Notifications
You must be signed in to change notification settings - Fork 467
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
[Bug] Audio pop cause by lack of emulator DC offset #115
Comments
Ah, this explains why all my other system sounds suddenly sounded like a Dalek while the emulator was active |
The emulator that I'm using is my fork of http://taisel.github.io/GameBoy-Online/ which seems to have the same sound issues https://github.com/taisel/GameBoy-Online if someone figures this out it would be nice to submit a pull request back to that project. My version changed the UI quite a lot but the audio part is mostly untouched (other than a bit of code to initialise audio on first input as browsers required this days) |
Think I've fixed this now as of 5a80a4f by following the instructions in this article http://alemangui.github.io/blog//2015/12/26/ramp-to-value.html and ramping the gain up and down when switching to and from the emulator window. I've submitted a pull request to GameBoy-Online with the same change also. @RichardULZ could you confirm if this version fixes the issue for you? |
@chrismaltby It's better, no more pop, but the underlying issue is still there. |
Hmm, I'm not hearing any background issues on macOS. I've tried modifying the audio buffer manually halving the volume and adding 0.5 like you initially suggested. Changed in df86512. Does that help at all? |
@chrismaltby Perfect! |
Note: for support questions, please use one of the following channels.
Reddit: /r/gbstudio
Discord: Join Chat
People have complained about a loud pop on GameBoy start.
I think this happens because the GB pulse waves are only set High or Low, and thus, the default sound is constantly -1, with pulse waves between -1 and +1.
This means a -1 audio signal is blasted into your computer at all times when running, any other program sounds will halve in volume and have other possible artifacts. RIP Headphone users that have to deal with a loud pop on game start and end.
Ideal Solution
A master DC offset/gain option in the emulator would be a solution. Halving the volume and adding a +0.5 or +1 offset so the default level is 0.
So instead of audio between -1 and +1, we remap that to 0 and +1.
The text was updated successfully, but these errors were encountered: