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

speech playback is _very_ slow #365

Open
speachy opened this issue Nov 22, 2021 · 4 comments
Open

speech playback is _very_ slow #365

speachy opened this issue Nov 22, 2021 · 4 comments
Assignees

Comments

@speachy
Copy link

speachy commented Nov 22, 2021

The speech in the intro plays back super slowly -- like the sample rate used for playback is way off. Interestingly, different individual speech snippets can play at different speeds (notably "there are no set territories..." sounds better than the rest)

I can't comment on the in-game speech, as the game crashes in the intro for me.

(This is with the US Dune2 release patched to v1.07, and revision a33c6d9)

@miniupnp
Copy link
Contributor

Which OS, which audio backend, etc are you using ?

please test with latest master : 548198a

@speachy
Copy link
Author

speachy commented Nov 25, 2021

I re-ran it with 548198a, same results.

I'm running this on Linux (Fedora 35), using SDL's default backend, which is probably PulseAudio. music playback (via timidity) is fine.

EDIT: DSP_Init() PulseAudio version 15.0.0

@speachy
Copy link
Author

speachy commented Nov 26, 2021

It turns out that PipeWire (which modern Fedora uses as a PulseAudio replacement) doesn't properly implement pa_stream_update_sample_rate() -- this means that OpenDune never changes its stream sample rate from 10989Hz.

The recommended solution is to tear down and re-init the stream when the sample rate changes [1] instead of using the sample rate change API, but that would require some reworking of the PA audio driver.

In the mean time, switching to the ALSA driver works around the issue for now.

[1] See ralph-irving/squeezelite#141 and https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1159 and https://freenode.logbot.info/pipewire/20210507#c7912675

@miniupnp
Copy link
Contributor

the pulse audio stream is open with PA_STREAM_VARIABLE_RATE so the bug is in PipeWire.
@speachy we may update ./configure so it detects (and rejects) PireWire when detecting PulsoAudio availability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants