Libgdx ではディスクから大きなデータを直接ストリーム再生するメソッドや小さな効果音を再生するメソッドが用意されています。 またオーディオハードウェアにアクセスして読み込みや書き込みが簡単にできます。
オーディオ機能への全てのアクセスは、 audio モジュールを介して行われます。audio への参照は以下のようにして行います:
Audio audio = Gdx.audio;
あなたのアプリケーションが一時停止や再開をした場合は、Libgdx があなたに代わって全ての音声再生の一時停止と再開を自動的に行います。
AudioLibgdx provides methods to playback small sound effects as well as stream larger music pieces directly from disk. It also provides convenient read and write access to the audio hardware. All access to the audio facilities is done through the audio module, referenced by: Audio audio = Gdx.audio; Libgdx will automatically pause and resume all audio playback for you if your application is paused and resumed. |