yobson1 / glua-soundduration

An alternative to the built in SoundDuration function in Garry's Mod that actually works
MIT License
14 stars 0 forks source link

Packed (inside .vpk) mp3 files error #4

Open Isemenuk27 opened 2 years ago

Isemenuk27 commented 2 years ago

When trying to get the length from packed mp3 files (inside .vpk archives) an error appears.

print(NewSoundDuration("music/hl2_song14.mp3"))

[gluasnd] addons/gluasnd/lua/autorun/soundduration.lua:128: attempt to index local 'buffer' (a nil value)

  1. unknown - addons/gluasnd/lua/autorun/soundduration.lua:128
    1. NewSoundDuration - addons/gluasnd/lua/autorun/soundduration.lua:217
    2. unknown - lua_run:1

print(NewSoundDuration("music/vlvx_song20.mp3")) --HL2EP2 print(NewSoundDuration("music/trombonetauntv2.mp3")) --TF2

Same errors.

DoopieWop commented 11 months ago

as far as i can tell there is no function in glua that grants access to reading the contents of vpks. insane that soundduration still hasnt been fixed.