Jump to content
Sign in to follow this  
travhimself

playSound repeating with very short audio clip

Recommended Posts

I have CfgSounds in my description.txt that look something like this:
 
class CfgSounds {

    sounds[] = {};

    class sound_radioin {
        name = "sound_radioin";
        sound[] = {"@a3\dubbing_radio_f\Sfx\in2a.ogg", 2, 1};
        titles[] = {1, ""};
    };

    class sound_radioout {
        name = "sound_radioout";
        sound[] = {"@a3\dubbing_radio_f\Sfx\out2a.ogg", 2, 1};
        titles[] = {1, ""};
    };

    class sound_radionoise {
        name = "sound_radionoise";
        sound[] = {"@a3\dubbing_radio_f\Sfx\radionoise2.ogg", 3, 1};
        titles[] = {1, ""};
    };
};

When I play sound_radionoise (which is several seconds long) in a mission using...

playSound "sound_radionoise"

...it works just as you would expect -- it plays a single time and stops.

 

However, if I try to play either of the other clips, which are very short in duration (less than 1 second), they will repeat several times before stopping.

 

It almost seems as though there is a minimum length to a playSound, and the clip gets looped until that minimum is reached. I've tried adding "duration = .25" to each of the troublesome clips, and this seems to have no effect -- they repeat several times, just as before.

 

Any ideas?

 

Share this post


Link to post
Share on other sites

Further discovery:

 

This may only be happening only with .ogg files. Very short clips in .wss format seem to work fine.

Share this post


Link to post
Share on other sites

For closure: I was never able to get those clips working properly with playSound. In the end I moved them into CfgRadio and now play them over sideRadio.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×