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 4642 - Rework SDL_netbsdaudio to improve performance
Summary: Rework SDL_netbsdaudio to improve performance
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: HG 2.0
Hardware: All NetBSD
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2019-05-24 22:36 UTC by Nia Alarie
Modified: 2019-06-08 20:03 UTC (History)
0 users

See Also:


Attachments
Rework netbsdaudio (9.00 KB, patch)
2019-05-24 22:36 UTC, Nia Alarie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nia Alarie 2019-05-24 22:36:10 UTC
Created attachment 3796 [details]
Rework netbsdaudio

The NetBSD audio driver has a few problems. Lots of obsolete code, and extremely bad performance and stuttering.

I have a patch in NetBSD's package system to improve it. This is my attempt to upstream it.

The changes include:

* Removing references to defines which are never used.
* Using the correct structures for playback and recording, previously they were the wrong way around.
* Using the correct types ('struct audio_prinfo' in contrast to 'audio_prinfo')
* Removing the use of non-blocking I/O, as suggested in #3177.
* Removing workarounds for driver bugs on systems that don't exist or use this driver any more.
* Removing all usage of SDL_Delay(1)
* Removing pointless use of AUDIO_INITINFO and tests that expect AUDIO_SETINFO to fail when it can't. 

These changes bring its performance in line with the DSP audio driver.
Comment 1 Sam Lantinga 2019-06-08 20:03:56 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/f26b341b14b4