We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3846 - Resampling of certain sounds adds popping noise
Summary: Resampling of certain sounds adds popping noise
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: HG 2.1
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 19:36 UTC by Dávid Nagy
Modified: 2017-10-21 17:14 UTC (History)
1 user (show)

See Also:


Attachments
Testcase (7.06 KB, application/zip)
2017-09-24 19:36 UTC, Dávid Nagy
Details
Recording of the testcase with bug (59.41 KB, audio/x-wav)
2017-10-14 08:35 UTC, Dávid Nagy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dávid Nagy 2017-09-24 19:36:21 UTC
Created attachment 2960 [details]
Testcase

When playing the attached WAV file using the attached program, the sound is played back with some popping noises.

SDL 2.0.5 and the pre-release of SDL 2.0.6 did not have the bug, but the final SDL 2.0.6 has the bug.
(I'm referring to this pre-release: https://discourse.libsdl.org/t/sdl-2-0-6-prerelease/23024)

The bug exists since this revision: https://hg.libsdl.org/SDL/rev/a8382e3d0b54

A very similar popping noise was fixed by this revision: https://hg.libsdl.org/SDL/rev/4cdc242e4102
Comment 1 Ozkan Sezer 2017-10-08 18:17:39 UTC
Does the patch in bug #3851 fix this?
Comment 2 Ryan C. Gordon 2017-10-11 06:40:08 UTC
(In reply to Ozkan Sezer from comment #1)
> Does the patch in bug #3851 fix this?

I assume this is a duplicate of Bug #3851, which should now be fixed.

--ryan.

*** This bug has been marked as a duplicate of bug 3851 ***
Comment 3 Dávid Nagy 2017-10-14 08:35:07 UTC
Created attachment 2983 [details]
Recording of the testcase with bug

I tried revision c48ab2c208a2, but my problem is still present.

I attached a recording of what my testcase sounds like with the bug.

When I examined the recording with Audacity, I noticed that when the waveform reaches -1.0, it repeatedly jumps to +1.0 and back, and this causes the popping.

This looks like an overflow.
Comment 4 Dávid Nagy 2017-10-14 08:37:43 UTC
Reopening bug.
Comment 5 Dávid Nagy 2017-10-21 14:35:20 UTC
The fix for bug #3876 fixed this bug as well: https://hg.libsdl.org/SDL/rev/37aca00967db

Closing bug.
Comment 6 Sam Lantinga 2017-10-21 17:14:02 UTC
Thanks!