-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win32 refresh: audio drivers, priority changes #286
Open
sukibaby
wants to merge
3
commits into
itgmania:beta
Choose a base branch
from
sukibaby:win32refreshB
base: beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
sukibaby
force-pushed
the
win32refreshB
branch
4 times, most recently
from
June 9, 2024 14:43
3eb6811
to
b7ba0d8
Compare
Mostly buffer maintenance, style updates, and thread priority restructuring. In WaveOut we are now using more buffers instead of larger buffers. On the other hand in DirectSound the buffer is just made larger since it is usually handling decoding etc.
teejusb
reviewed
Jun 10, 2024
if( m_iBufferBytesFilled >= m_iBufferSize ) | ||
return; | ||
// Store the buffer size in a variable to avoid multiple calls | ||
int storedSizeOfBuffer = m_iBufferSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessary. It doesn't look like we're changing it and also it's just a plain old data type so seems not required.
**arch/Sound/DSoundHelpers.cpp** * Set the DirectSound buffer to 512KB instead of 64KB **arch/Sound/RageSoundDriver_DSound_Software.cpp** * Priority fixes **arch/Sound/RageSoundDriver_WaveOut.cpp** * Priority fixes **arch/Sound/RageSoundDriver_WDMKS.cpp** * Allow the buffer size to adapt to the number of channels and maximum bytes per sample * Set one temporary buffer big enough to reuse multiple times instead of setting the buffer to ~2-4KB and reallocating it as needed * Keep track of the starting position of `pBuf` * Priority fixes * Win32_lean_and_mean
Temporarily closing so this doesn't distract from more pressing PR's. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main changes in this are: restructuring the thread priority and taking the heavy lifting off the audio driver, to improve consistency between different people's setups.
The thread priority restructuring follows this theory:
arch/Sound/DSoundHelpers.cpp
arch/Sound/RageSoundDriver_DSound_Software.cpp
arch/Sound/RageSoundDriver_WaveOut.cpp
arch/Sound/RageSoundDriver_WDMKS.cpp
pBuf