Audio events are a special type of event that allow you to preview, synchronize, and iterate on both your graphics and audio assets directly within the Spine editor. Spine currently supports WAV, MP3, and OGG audio formats.
Audio node in the tree stores a path to a folder where Spine will find the audio files for the skeleton. The
Audio path can be relative to where the project file is saved or can be an absolute path. The
Browse button can be used to specify a path, or you can type a path and press enter. Once the path is set, the audio files in that folder appear under the
Audio node. Spine watches the audio folder and immediately loads any changes to the files.
Once audio files are listed inside the Spine project, it is possible to create an audio event by either dropping the audio file on the
Events node or by selecting the audio file and clicking the
New Event button. This creates a new audio event inside the
Events node, ready to be keyed in animation mode.
Aside from normal events properties, audio events have 3 additional properties:
Audio pathspecifies the location of the audio file associated with the audio event. If this is set, the audio file will be played when a key for this event is hit in an animation.
Volumesets the playback volume.
Balancesets the volume of the left and right channels for stereo, or set the panning for mono.
Audio events can be keyed the same way as other events. When an audio event is keyed, it is also possible to key volume and balance values differently from the setup values.
Keyed audio is better displayed in the Audio view.
The audio playback is an editor-only feature. At runtime, the 3 additional event properties are available but the Spine Runtimes do not manage loading and playing back audio. Synchronizing audio with Spine animations at runtime is still managed as before: register an event handler with AnimationState or TrackEntry to trigger playing the audio you want for each event.