Skip to content
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

(WASAPI) Shared buffer refactor + cleanup #15929

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

sonninnos
Copy link
Collaborator

Description

  • Reworked shared buffer operation for more flexibility
    • Replaced the first 3 smallest frame values for "preset" operation, since they can't be used anyway
      • Had to keep the menu item visible strings ugly, since setting_action_ok_uint_special() does atoi() on them
    • Removed unbuffered mode since it has no practical use
    • Removed dodgy negative value for "Auto"
    • Added shared buffer menu dropdown
  • Fixed exclusive mode last buffer looping when entering menu with menu sounds disabled
  • Reduced logging noise

Basically now the shared mode also uses the common Audio Latency buffer size as buffer period when the shared buffer value is at default 0. Also basically this makes the separate shared buffer option useless, since too small buffer period already automatically uses the minimum usable shared buffer size (Client Buffer), but let's keep it for now until more data is gathered, also relating to the same option for microphone. Hopefully we can get rid of both of them eventually.

The goal is to get consistent performance with differently behaving cores with the default values like every other driver, and allow tweaking for better latency. Currently increasing the buffer size does nothing, because the used buffer size is always limited by the Client Buffer size, because the shared client is initialized with buffer period size 0 regardless of Audio Latency, and Audio Latency is ignored completely.

Related Issues

#15920

@LibretroAdmin LibretroAdmin merged commit 598a0c0 into libretro:master Nov 19, 2023
22 checks passed
@sonninnos sonninnos deleted the wasapi-buffer branch November 19, 2023 17:01
Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants