kondrak / vkQuake2

id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, macOS, FreeBSD, Raspberry Pi 4)
GNU General Public License v2.0
896 stars 91 forks source link

Audio plays back too quickly on macOS. #117

Closed emctague closed 3 years ago

emctague commented 3 years ago

All the audio for the game is playing back faster than usual, causing all sounds to be chipmunk'd. - enemies sound absolutely hilarious, environmental sounds are off, etc.

Tried: adjusting in game audio quality settings, adjusting s_khz. No change.

Paks: Standard Quake2 paks off Steam release. OS / Platform: MacOS Big Sur Config.cfg: here vkQuake2 version: commit ef49294ae860a4892d9caf82fef8b494b0f9e1a0 (latest on master as of Jan 2, 2020) VulkanSDK VERSIONS.txt: here latest as of today

I am currently updating my VulkanSDK to the latest December release, I will close this issue if Audio issues resolve after that but I doubt it. (Audio still broken after update.)

kondrak commented 3 years ago

Weird - did you get a chance to test it on Catalina/older OS? Running Catalina myself, I cannot reproduce this, haven't updated to Big Sur yet.

emctague commented 3 years ago

I haven't gotten a chance to test it on Catalina or older, but I have found another oddity - it only does this when listening through AirPods. Even if I connect the AirPods midway through normal gameplay, and then fiddle with the in-game Audio Quality setting to force it to switch outputs, it then plays back high-pitched. I'm curious if the same would happen with other bluetooth outputs as well.

kondrak commented 3 years ago

So it's fine if using standard speakers? Odd indeed, but might be a good starting point for further investigation.

kondrak commented 3 years ago

Also - does this affect music playback as well?

emctague commented 3 years ago

I don't think I have a copy of the soundtrack / music files to test with, but since it seems to impact every bit of game audio, incl. background / level ambiance and menu sounds, so I would assume it covers music as well,

kondrak commented 3 years ago

You can test with any .ogg file, not necessarily original music - it's handled by a different library and I'm trying to see if it's a global playback issue or maybe something specific to the original code only.

kondrak commented 3 years ago

This should now be fixed on latest master - there was in fact a weird hack for handling different sample rates which manifested only on bluetooth headphones - let me know if it works!

emctague commented 3 years ago

Confirming it works perfectly! Thanks for the quick fix! 👍

rullinoiz commented 2 years ago

i am also having this issue, monterey with bluetooth headphones and M1. I have tried compiling for both intel and arm and neither have fixed it. sample rates are most likely the issue as i cannot change the rate of mine to 44100khz through audio midi setup to troubleshoot. using 53f17a2 compiled through the terminal

forgot to add: the sounds aren't chipmunky like how @emctague describes it. they are just playing too fast as if a faster playback speed was chosen on youtube

kondrak commented 2 years ago

@rullinoiz does it happen on headphones only or also if you play via built-in speakers?

rullinoiz commented 2 years ago

@rullinoiz does it happen on headphones only or also if you play via built-in speakers?

it's not happening on the built in speakers, only the bluetooth headphones