PCM 데이터 처리
소리 파형이 재생될 때 PCM 데이터 얻기
소리 파형이 재생될 때 PCM 데이터를 얻으려면 OnGeneratePCMData 델리게이트를 사용할 수 있습니다. 이는 PCM 오디오 데이터를 처리하거나 분석할 때 유 용합니다.
- 블루프린트
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object (or its derived type, such as UStreamingSoundWave, UCapturableSoundWave, etc.)
ImportedSoundWave->OnGeneratePCMDataNative.AddWeakLambda(this, [this](const TArray<float>& PCMData)
{
// Handle the result
});
새로 채워진 PCM 데이터 가져오기
OnPopulateAudioData 델리게이트를 사용하여 새로 채워진 PCM 데이터를 얻을 수 있습니다. 이는 스트리밍 사운드 웨이브에 특히 유용하며 오디오 분석 프로세스를 단순화할 수 있습니다.
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object (or its derived type, such as UStreamingSoundWave, UCapturableSoundWave, etc.)
ImportedSoundWave->OnPopulateAudioDataNative.AddWeakLambda(this, [this](const TArray<float>& PopulatedAudioData)
{
// Handle the result
});
PCM 데이터를 바이트로 변환하기
이 델리게이트에서 얻은 PCM 데이터는 32비트 부동 소수점 PCM 형식입니다. PCM 데이터를 바이트로 변환해야 하는 경우 오디오 트랜스코딩을 참조하세요.