ऑडियो निर्यात करें
ध्वनि तरंग आयात करने के बाद, आप इसे मेमोरी या फ़ाइल में निर्यात करना चाह सकते हैं। प्लगइन विभिन्न प्रारूपों में ऑडियो निर्यात करने की कार्यक्षमता प्रदान करता है, जिसमें सैंपल दर (पुनः नमूनाकरण) और चैनलों की संख्या (मिश्रण) को ओवरराइड करने के विकल्प शामिल हैं।
समर्थित ऑडियो प्रारूप
प्लगइन निम्नलिखित ऑडियो प्रारूपों में निर्यात करने का समर्थन करता है:
- WAV - वेवफॉर्म ऑडियो फ़ाइल प्रारूप
- OGG VORBIS - वोर्बिस ऑडियो के साथ ओग कंटेनर
- OGG OPUS - ओपस ऑडियो के साथ ओग कंटेनर
- BINK - बिंक ऑडियो (विंडोज x64, मैक, और लिनक्स केवल UE >= 5.0 में)
- RAW (PCM) - असंपीडित पल्स-कोड मॉड्यूलेशन ऑडियो डेटा (Int8, UInt8, Int16, UInt16, Int32, UInt32, Float32)
उदाहरण
- 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
}));