forked from PortAudio/portaudio
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dsound: simplify CalculateBufferSettings()
This commit rewrites CalculateBufferSettings() in an attempt to make it a bit less headache-inducing. The basic idea is to reduce branching, reduce code duplication, and share code paths between the various cases (fixed/variable user buffer, half/full duplex) as much as possible. Also, min()/max() are easier to read than if statements. This is a pure refactoring - there should be no change in observable behaviour. The math stays the same, it is merely reshuffled around in place.
- Loading branch information
Showing
1 changed file
with
18 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters