-
-
Notifications
You must be signed in to change notification settings - Fork 255
Pop when starting playback on WASAPI backend #288
Comments
Neither, we should devendor all dependencies: #228 |
Will devendoring dependencies make it less self-contained and more difficult to build on Windows without using external package managers like vcpkg? |
Yes, that's the point. But it won't be difficult to build with vcpkg. |
I may have incidentally addressed this issue with https://github.com/tenacityteam/tenacity/pull/430. If possible, can you build and test that PR locally and tell me if you can still repro the issue or if it is fixed? I was having popping issues and addressed them, and I have reason to believe it may also have fixed this issue. |
I tried building that branch with the one-line fix to make it build. The audio playback bug is not fixed. Apparently I failed to mention in this bug report, but even with AudioIO stubbed out to skip all function calls and instead fill the output buffer with nothing but a DC offset, the program still produces a crackle on old PortAudio, and only stops crackling on new PortAudio. So it's not Audacity or Tenacity's fault, but PortAudio's. |
Ah, see I didn't know that you'd stubbed out the functions. In that case you are right, and it seems the only thing to do is to replace the PortAudio version used. |
I'm not surprised. |
Why the confused face, @nyanpasu64 ? |
Well considering that I wasn't trying to fix the issue, I just did something that may have fixed it as I had not diagnosed the source of the issue yet, not being surprised that it didn't work is entirely unremarkable. Please stop leaving passive-aggressive comments on everything I do on this repository. |
Everything? No. Only this one overthought and overconfident thing #412 you did, and pushed without anyone else reviewing it beforehand, which was a "fix" for a non-problem, and put in memory leaks necessitating other fixes of the fix, and is still in search of its bug, but sadly failing to find it here. |
Has this been fixed since #228 was merged building with an updated PortAudio library? |
Tried building 13914c5. Now with WASAPI (but not MME/DirectSound/WDM-KS), beginning playback instead hangs and never finishes playing. (I hear a pop, but the UI never disables as it should during playback.) And the program crashes when I close it. Honestly I don't like using external/vcpkg PortAudio. Now I can't "jump to source" in the IDE to navigate the PortAudio source, making it harder to set breakpoints within PortAudio to find out what the problem is (not sure if it's possible at all, if the .pdb files are located correctly), and harder to edit PortAudio and rebuild to see the effects on Tenacity. |
Oof, that's nasty. You should be able to debug with vcpkg dependencies as long as you haven't deleted the |
I don't feel like investigating right now, I may do so later though. |
Describe the bug
When using the WASAPI backend on Windows, Tenacity usually pops when playback starts.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Playback occurs smoothly.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional information (please complete the following information):
Additional context
Updating PortAudio to v19.7.0 fixes this bug. However it's tricky to make newer versions of PortAudio build and link properly, either through CMake proxies (I gave up on this approach but it might be workable) or by using PortAudio's native CMakeLists.txt (by disabling PortMixer through
-Duse_portmixer=off
and removing the usage of PaUtil_GetTime). I can push my hacky branch if anyone's interested, but I think stock PortAudio is missing loopback capture.My guess is that this issue is fixed by PortAudio/portaudio@697fcdd, or less likely PortAudio/portaudio@9ebe293. However I don't know if cherry-picking is the right approach or we should upgrade PortAudio altogether.
After fixing this bug (which obscured the beginning of playback with loud pops), I noticed that WASAPI has a bit of "fade-in" unlike MME and DirectSound, but only if the first sample being played is significantly nonzero. This is present in Audacity 3.0.2, as well as Tenacity with both old and new PortAudio. I don't know if it's caused by WASAPI or PortAudio. I'd personally prefer if it could be disabled or removed, so you can hear the beginning of audio files properly (for example the attack of a sampled instrument), but I'm not sure how to remove it, and I don't know if it's worth the trouble.
The text was updated successfully, but these errors were encountered: