Skip to content

Instantly share code, notes, and snippets.

@triacontane
Created May 3, 2020 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triacontane/f5c9330c9bfd2641f475ad41089c1ccd to your computer and use it in GitHub Desktop.
Save triacontane/f5c9330c9bfd2641f475ad41089c1ccd to your computer and use it in GitHub Desktop.
演奏位置を保持したままBGMのピッチを変更します。
var bgm = AudioManager._currentBgm;
var pos = AudioManager._bgmBuffer.seek();
// BGMのpitchを変数[1]から取得
bgm.pitch = $gameVariables.value(1);
AudioManager.playBgm(bgm);
AudioManager._bgmBuffer.play(true, pos);
@triacontane
Copy link
Author

BGMを演奏していないときに実行するとエラーになります。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment