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 3615

Summary: Audio callback gets delayed if pavucontrol isn't started (if it's started, there is no delay)
Product: SDL Reporter: Andre <andreapfel>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: andreapfel
Version: 2.0.5   
Hardware: x86_64   
OS: Linux   
Attachments: MWE

Description Andre 2017-03-25 13:52:57 UTC
Created attachment 2707 [details]
MWE

Run my attached MWE.

If pavucontrol is not opened, then the output will be:

	Started at 31, expect next in 11
	Callback at 2010
	Callback at 2010
	Callback at 2010
	Callback at 2010
	Callback at 2010
	Callback at 2010

If pavucontrol is opened, then the output will be:

	Started at 18, expect next in 11
	Callback at 32
	Callback at 52
	Callback at 52
	Callback at 72
	Callback at 72
	Callback at 93
	Callback at 113
	Callback at 113
	Callback at 136
	Callback at 136
	Callback at 153
	Callback at 153
	Callback at 173
	Callback at 193

I expected my program to behave the latter also without pavucontrol opened. If pavucontrol is not opened, the callback gets delayed by 2 seconds.

Nominal Animal at Stackoverflow (https://stackoverflow.com/questions/42990071) said that the delay could be due to internal buffering.

I have tested this with SDL2 and pulseaudio:

* Linux 4.10.4
* SDL 2.0.5
* pulseaudio 10.0
* alsa 1.1.3
* pavucontrol 3.0

I compiled the MWE with: gcc -lSDL2 MWE.c
Comment 1 Ryan C. Gordon 2018-08-06 21:20:19 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.