-
-
Notifications
You must be signed in to change notification settings - Fork 45
音频‐使用示例
muzzik edited this page Jul 6, 2024
·
1 revision
mk.audio.play(this.audio);
// 需要最大重叠几次就包含几个 mk.audio_.unit
let overlap_effect_as = [this.audio, ...this.audio.clone(4)];
mk.audio.play(overlap_effect_as.find((v) => v.state === mk.audio_.state.stop)!);
// 播放处于 pause 或 stop 状态的 effect 类型音频
mk.audio.get_group(global_config.audio.type.effect).play(mk.audio_.state.pause | mk.audio_.state.stop);
mk.audio.pause(this.audio);
mk.audio.get_group(global_config.audio.type.effect).pause();
mk.audio.pause_all();
mk.audio.play(this.audio);
mk.audio.get_group(global_config.audio.type.effect).play(mk.audio_.state.pause);
mk.audio.resume_all();
mk.audio.stop(this.audio);
mk.audio.get_group(global_config.audio.type.effect).stop();
mk.audio.stop_all();