このページでは

AmbientSound QML Type

ステレオオーバーレイサウンド。詳細...

Import Statement: import QtQuick3D.SpatialAudio

プロパティ

方法

詳細な説明

AmbientSoundは、位置や向きに依存しない音を表します。これは、リスナーの位置や向きに関係なく再生される背景音(音楽など)によく使用されます。

プロパティのドキュメント

autoPlay : bool

ソースが指定された際に、音声を自動的に再生するかどうかを決定します。

デフォルト値はtrue です。

loops : int

プレーヤーが停止するまでに、サウンドが再生される回数を指定します。現在のサウンドを無限にループさせるには、QAmbienSound::Infinite に設定してください。

デフォルト値は1 です。

source : url

再生する音声のソースファイル。

volume : real

この音源の全体的な音量を設定します。

メソッドのドキュメント

void pause()

現在の位置で音声の再生を一時停止します。play() を呼び出すと、再生が再開されます。

void play()

音声の再生を開始します。すでに音声が再生されている場合は、何も行いません。

void stop()

サウンドの再生を停止し、現在の位置とループ回数を0にリセットします。play() を呼び出すと、サウンドファイルの先頭から再生が開始されます。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.