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

Make the decoder open file from the sound directory by default #2

Closed araghon007 closed 3 years ago

araghon007 commented 3 years ago

I'd suggest prepending soundPath with "sound/" when opening the file so NewSoundDuration could be used as a drop in replacement for SoundDuration (e.g. NewSoundDuration("test.wav") instead of NewSoundDuration("sound/test.wav"))

yobson1 commented 3 years ago

I think it's preferable to leave it as is so sound files from any directory can be accessed with NewSoundDuration, sounds downloaded to the data directory for example. If your use case doesn't require that then you're free to make the change for yourself.