사운드 웨이브 속성
오디오 데이터 접근
PCM 버퍼 검색
사운드 웨이브에서 직접 전체 PCM 버퍼를 검색할 수 있습니다.
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
TArray<float> PCMBuffer = ImportedSoundWave->GetPCMBufferCopy();
팁
얻은 PCM 데이터를 바이트로 변환해야 하는 경우 Float Array to Bytes를 참조하세요.
재생 속성
루핑(Looping)
원활한 오디오 루프를 생성하기 위해, 루핑을 설정하여 사운드 웨이브 재생이 끝난 후 자동으로 재생 시간을 0으로 되감고 다시 재생할 수 있습니다.
- 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);
추가 기능
자막
자막을 설정할 수 있습니다. 즉, 표시할 텍스트와 표시 시간을 정의할 수 있습니다.
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
TArray<FEditableSubtitleCue> Subtitles;
FEditableSubtitleCue Subtitle;
Subtitle.Text = FText::FromString("Example");
Subtitle.Time = 2.0f;
Subtitles.Add(Subtitle);
ImportedSoundWave->SetSubtitles(Subtitles);
가상화 모드(Virtualization Mode)
Play When Silent와 같은 가상화 모드를 설정할 수 있습니다. 이 모드는 무음 상태에서도 사운드 웨이브 재생이 계속되도록 합니다.
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object
ImportedSoundWave->SetVirtualizationMode(EVirtualizationMode::PlayWhenSilent);
노트
이 기능은 특히 오디오가 거리에 따라 페이드되는 방식을 제어하기 위해 사운드 감쇠(sound attenuation)를 사용하는 경우에 유용합니다.