Ses Dışa Aktarma
Bir ses dalgasını içe aktardıktan sonra, onu belleğe veya bir dosyaya dışa aktarmak isteyebilirsiniz. Eklenti, örnekleme hızını (yeniden örnekleme) ve kanal sayısını (miksleme) geçersiz kılma seçenekleriyle çeşitli formatlarda ses dışa aktarma işlevselliği sağlar.
Desteklenen ses formatları
Eklenti aşağıdaki ses formatlarına dışa aktarmayı destekler:
- WAV - Waveform Audio File Format
- OGG VORBIS - Vorbis sesli Ogg konteyneri
- OGG OPUS - Opus sesli Ogg konteyneri
- BINK - Bink Audio (Yalnızca Windows x64, Mac ve UE >= 5.0'da Linux)
- RAW (PCM) - Sıkıştırılmamış Pulse-Code Modulation ses verileri (Int8, UInt8, Int16, UInt16, Int32, UInt32, Float32)
Örnekler
- Blueprint
- C++
// Assuming ImportedSoundWave is a UE reference to a UImportedSoundWave object (or its derived type, such as UStreamingSoundWave, UCapturableSoundWave, etc.)
// Export the sound wave to a file
URuntimeAudioExporter::ExportSoundWaveToFile(ImportedSoundWave, TEXT("C:/ExportedAudio.ogg"), ERuntimeAudioFormat::OggVorbis, 100,
FRuntimeAudioExportOverrideOptions(),
FOnAudioExportToFileResultNative::CreateWeakLambda(this, [this](bool bSucceeded)
{
// Handle the result
}));
// Export the sound wave to a RAW file
URuntimeAudioExporter::ExportSoundWaveToRAWFile(ImportedSoundWave, TEXT("C:/ExportedAudio.raw"), ERuntimeRAWAudioFormat::UInt16,
FRuntimeAudioExportOverrideOptions(),
FOnAudioExportToFileResultNative::CreateWeakLambda(this, [this](bool bSucceeded)
{
// Handle the result
}));
// Export the sound wave to a buffer
URuntimeAudioExporter::ExportSoundWaveToBuffer(ImportedSoundWave, ERuntimeAudioFormat::Wav, 100,
FRuntimeAudioExportOverrideOptions(),
FOnAudioExportToBufferResultNative::CreateWeakLambda(this, [this](bool bSucceeded, const TArray64<uint8>& AudioData)
{
// Handle the result
}));
// Export the sound wave to a RAW buffer
URuntimeAudioExporter::ExportSoundWaveToRAWBuffer(ImportedSoundWave, ERuntimeRAWAudioFormat::Float32,
FRuntimeAudioExportOverrideOptions(),
FOnAudioExportToBufferResultNative::CreateWeakLambda(this, [this](bool bSucceeded, const TArray64<uint8>& AudioData)
{
// Handle the result
}));