Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: arj0n on Wed 10/03/2021 21:29:15

Title: OGG sfx with small duration issue (so use wav)
Post by: arj0n on Wed 10/03/2021 21:29:15
I have a gun sfx OGG sound file which has a duration of 180ms.
After importing it as audio>sound it plays correct in the preview pane.

When playing the gun sfx via AudioClip.Play or AudioChannel* AudioClip.Play, only a short click is heard.
When playing a longer sound, for example a BG music track (OGG), all works fine.
After converting the OGG into WAV and importing that into AGS, the WAV version of the gun sfx plays fine via AudioClip.Play and AudioChannel* AudioClip.Play.

So, is there an issue with OGG files that have a certain (too) short duration?
Title: Re: OGG sfx with small duration issue
Post by: Crimson Wizard on Wed 10/03/2021 21:46:45
Yes, iirc there is this problem with OGG player in ags. I think someone suggested to add silence in the end, but idk how this will work for a looping sound.
Title: Re: OGG sfx with small duration issue
Post by: arj0n on Wed 10/03/2021 21:55:59
Ah, ok.
I've tried to add more silence, but apparently I it was still too short cause the issue was still there.
And as using a quick loop might indeed become a problem, I'll go with the wav version.
Thanx for the answer  :)
Title: Re: OGG sfx with small duration issue (so use wav)
Post by: nightmarer on Sun 08/12/2024 09:06:39
Hello, I'll bring this problem again back as it seems it is still happening.
Title: Re: OGG sfx with small duration issue (so use wav)
Post by: eri0o on Sun 08/12/2024 10:18:17
Please,

Title: Re: OGG sfx with small duration issue (so use wav)
Post by: Rik_Vargard on Sun 08/12/2024 11:33:45
If you have a sound that has to be looped and that's too short, maybe you could edit in Audacity and make the sound playing two or three times and then loop that new sound?
Also, I make sure that any sound file is at least 1 second long and that works for me.