altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

Add Audio.state as enum

Open GVMP opened this issue 1 year ago • 0 comments

Description of the problem

Set a state based on errored / loaded so we can use async code for audio creation and don't rely on events.

Desired solution for the problem

try {
    await alt.Utils.waitFor(audio.state == alt.AudioState.Loaded);
} catch(e) {
    return;
}

Alternatives you considered

No response

Additional context

No response

GVMP avatar Jan 18 '24 10:01 GVMP