Hydra

Hydra SFX & Sounds

First, create a sound effect with the API:

var sound = lib.sounds.createSFX("./sound.mp3")

Edit and control the audio in various ways:

// Control
sound.play()
sound.pause()
sound.stop()

// Modify values
sound.setVolume(volume)
sound.setLoop(loop)
sound.setPlaybackRate(rate)
sound.setMuted(muted)

// Get values
sound.isPlaying()
sound.isPaused()
sound.isEnded()

If our APIs arent enough, interface with the Audio yourself:

sound.editAudio((audio) => {
    // Do whatever
    return audio;
})