Page MenuHomeFeedback Tracker

Sound event Event_OnSoundWaveEnded fired only once when use some ogg files.
Assigned, UrgentPublic

Description

When try to play some ogg files, event Event_OnSoundWaveEnded fire only first time.

Example code (Thx Arkensor)

modded class MissionGameplay
{
    void TestSoundEvent()
    {
        auto sound = SEffectManager.PlaySoundOnObject("Talking_SoundSet1001", GetGame().GetPlayer());
        sound.Event_OnSoundWaveEnded.Insert(AmIBeingCalled);
        sound.SetSoundAutodestroy(true);
    }

    void AmIBeingCalled()
    {
        Print("I was called!!!");
    }

    override void OnKeyPress( int key )
    {
        switch ( key )
        {
            case KeyCode.KC_N:
            {
                TestSoundEvent();
                return;
            }
        }

        super.OnKeyPress( key );
    }
};

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General
Steps To Reproduce

Play sound multiple times by pressing key.
Check log.

Event Timeline

Hunterz created this task.Nov 1 2021, 2:43 PM


This file fire event only once


This file fire event everytime as expected.

I can listen sound, only that event is problem.

I am suspecting that ogg files shorter than some limit (for example 1 second) are handled not properly. Or there is some other unknown reason for me.

Geez changed the task status from New to Assigned.Nov 1 2021, 3:55 PM