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

[BUG] Sound stutters on Windows Vista #439

Closed
1 task done
Dasperal opened this issue Apr 16, 2023 · 3 comments · Fixed by #440
Closed
1 task done

[BUG] Sound stutters on Windows Vista #439

Dasperal opened this issue Apr 16, 2023 · 3 comments · Fixed by #440
Labels
Audio Issues related to sound and music system bug

Comments

@Dasperal
Copy link
Member

International Doom version

Inter Doom 6.2.1 and 142f489

What Operating System are you using?

Windows Vista

What Build variant of International Doom are you using?

x86 (x32, win32)

Please describe your specific OS version

Windows Vista Ultimate SP2 x86

Relevant hardware info

AMD Ryzen 7 3700X, Nvidia GTX 1080

Have you checked that no other similar issue already exists?

  • I have searched and not found similar issues.

A clear and concise description of what the bug is.

On Windows Vista x86 there are sound lags for every supported audio type (MP3, MOD, FLAC, opus, vorbis) and synth (OPL2, OPL3, GUS), except MIDI (Windows Native MIDI API).
Expected (Win 7 x64): https://www.youtube.com/watch?v=Ix6Mwx4Bkss
Actual (Win Vista x86): https://www.youtube.com/watch?v=oMDluIHAqSY

Steps to reproduce the behaviour.

  1. Start Inter Doom under Windows Vista x86.
  2. Select any music synth, except MIDI.
  3. Experience sound lags.

Your configuration

https://gist.github.com/Dasperal/f5bdce5b870620c1137b0dba788679ba

Provide a Log

https://gist.github.com/Dasperal/c407ea7495e488ca772d6c38e782c9d5

@Dasperal Dasperal added bug Audio Issues related to sound and music system labels Apr 16, 2023
@Dasperal Dasperal self-assigned this Apr 16, 2023
@Dasperal
Copy link
Member Author

libsdl-org/SDL_mixer#512

@Dasperal Dasperal changed the title [BUG] Sound lags on Windows Vista [BUG] Sound stutters on Windows Vista Apr 23, 2023
@Dasperal Dasperal removed their assignment Apr 23, 2023
@Dasperal
Copy link
Member Author

The stutters were caused by the wasapi audio driver. To fix them, we need to set SDL_HINT_AUDIODRIVER to directsound before audio subsystem of SDL is initialized. I think the best place for now will be in i_main.c because initialization sequence is quite complicated. Audio subsystem of SDL can already be initialized once we come to initialization of the music module.

Our audio subsystem really needs a big refactoring.

@Dasperal
Copy link
Member Author

For current releases, you can create *.bat file with the following text:

Set SDL_AUDIODRIVER=directsound
inter-doom %*

and use it to run inter-doom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Audio Issues related to sound and music system bug
Development

Successfully merging a pull request may close this issue.

1 participant