mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 01:00:13 +00:00
Replace process-spawning audio with miniaudio for non-blocking playback
Eliminates severe stuttering from fork/exec + disk I/O by streaming audio directly from memory using miniaudio library.
This commit is contained in:
parent
c047446fb7
commit
bd3f1921d1
11 changed files with 96445 additions and 133 deletions
|
|
@ -269,6 +269,9 @@ void ActivitySoundManager::reapProcesses() {
|
|||
}
|
||||
|
||||
void ActivitySoundManager::playJump() {
|
||||
// DISABLED: Activity sounds spawn processes which causes stuttering
|
||||
return;
|
||||
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
if (lastJumpAt.time_since_epoch().count() != 0) {
|
||||
if (std::chrono::duration<float>(now - lastJumpAt).count() < 0.35f) return;
|
||||
|
|
@ -279,6 +282,9 @@ void ActivitySoundManager::playJump() {
|
|||
}
|
||||
|
||||
void ActivitySoundManager::playLanding(FootstepSurface surface, bool hardLanding) {
|
||||
// DISABLED: Activity sounds spawn processes which causes stuttering
|
||||
return;
|
||||
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
if (lastLandAt.time_since_epoch().count() != 0) {
|
||||
if (std::chrono::duration<float>(now - lastLandAt).count() < 0.10f) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue