💬

Community answer

Collected from the ACE community Discord archive around 2024-01-14. It may be informal or outdated — anyone can edit this page to improve it. This topic changes between game versions — double-check before relying on it. Original discussion

Sound duration: SoundDuration vs bass getLength

🔊 SoundUpdated 2 days ago•0 views
SoundDuration and Bass:getLength are different systems (Source audio vs IGmodAudioChannel music player). SoundDuration doesn't return correct duration on MacOS/…

Why does bass sound :getLength() return the wrong length for a wav

SoundDuration and Bass:getLength are different systems (Source audio vs IGmodAudioChannel music player). SoundDuration doesn't return correct duration on MacOS/Linux or non-.wav on Windows; for approximate duration of mp3s multiply by ~4.5 (unreliable). Alternatives: store durations in a table/filename, use ffprobe -show_entries format=duration, or port a glua soundduration library. Wavs also don't work well with bass - convert to ogg/mp3.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.