Skip to content

Port to QtMultimedia#2

Draft
zrax wants to merge 4 commits into
masterfrom
qtmm
Draft

Port to QtMultimedia#2
zrax wants to merge 4 commits into
masterfrom
qtmm

Conversation

@zrax
Copy link
Copy Markdown
Owner

@zrax zrax commented Sep 4, 2020

(Warning: Work in progress)

This changes tworld2 to use QtMultimedia instead of SDL for sound effect playback. This makes porting to other platforms easier, and reduces the number of dependencies needed for building tworld2. Note that this does not affect OSHW=sdl (tworld 1) builds.

Current known issues

  • Using the loopCount property of QSoundEffect will cause playback of a looping sound will continue for one loop longer than necessary (most noticeable when exiting ice). It's possible to stop it earlier with QSoundEffect::stop(), but this causes the underlying audio device to detach from the sound system, which (at least on Windows) causes a hang of ~500ms on the GUI thread, which is unacceptable.

zrax added 4 commits September 4, 2020 16:40
The stop() method apparently detaches the underlying device handle,
which causes a noticeable delay on the GUI thread when stopping a
repeating sound effect.
Easier now that SDL isn't required.
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.

1 participant