音波プロパティ
オーディオデータへのアクセス
PCMバッファの取得
サウンドウェーブから直接PCMバッファ全体を取得できます。
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
TArray<float> PCMBuffer = ImportedSoundWave->GetPCMBufferCopy();
ヒント
取得したPCMデータをバイトに変換する必要がある場合は、Float Array to Bytesを参照してください。
再生プロパティ
ループ再生
シームレスなオーディオループを作成するには、ループ設定を有効にすることで、再生終了後に自動的にサウンドウェーブの再生位置をゼロに巻き戻して再生できます。
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
ImportedSoundWave->SetLooping(false);
音量制御
再生中のサウンドの音量を、必要に応じて調整できます。
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
ImportedSoundWave->SetVolume(1.0f);
ピッチ調整
再生中のサウンドのピッチを好みに応じて調整できます。
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
ImportedSoundWave->SetPitch(1.0f);