Skip to content

MVE refactoring#491

Merged
Lgt2x merged 2 commits intoDescentDevelopers:mainfrom
winterheart:mve-update
Jul 18, 2024
Merged

MVE refactoring#491
Lgt2x merged 2 commits intoDescentDevelopers:mainfrom
winterheart:mve-update

Conversation

@winterheart
Copy link
Collaborator

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

This PR changes MVE library to use "push" model of filling sound buffer by switching to SDL_QueueAudio() instead of "pull" by using SDLAudioCallback. This fixes some issues when the sound buffer gets exhausted before refilling and delays on slow Debug environments.
Additional fix addressed to correct sample_size on mveaudio_process() with 8-bit samples (though they don't used in D3).

Related Issues

Closes #490.

Screenshots (if applicable)

Checklist

  • I have tested my changes locally and verified that they work as intended.
  • I have documented any new or modified functionality.
  • I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

Fixes some issues when sound buffer get exhausted before refilling.
Change mveaudio_process() to use sample size defined by stream.
Copy link
Member

@Lgt2x Lgt2x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works great on Linux. Will test Windows debug

@Lgt2x
Copy link
Member

Lgt2x commented Jul 18, 2024

Movies also run flawlessly on Windows

@Lgt2x Lgt2x merged commit 5641ba4 into DescentDevelopers:main Jul 18, 2024
@winterheart winterheart deleted the mve-update branch August 12, 2024 20:58
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.

[Runtime Issue]: MVE playback crashes on launch with extra launch options

2 participants