Skip to main content

audio

Play sound effects (SE) and background music (BGM) with volume, fading, and playback control. Sound effects are one-shot; BGM is continuous with transport controls.

Import

import { audio } from "@hmcs/sdk";

Functions

FunctionDescription
se.playPlay a one-shot sound effect
bgm.playStart background music playback
bgm.stopStop the currently playing BGM
bgm.pausePause the currently playing BGM
bgm.resumeResume paused BGM playback
bgm.updateUpdate volume or speed while playing
bgm.statusGet the current BGM playback status