Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Sound
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Sound/SampleBufferIO.h |
| Include | #include "Sound/SampleBufferIO.h" |
Syntax
class FSoundWavePCMWriter
Remarks
FSoundWavePCMWriter This class can be used to save a TSampleBuffer to either a wav file or a USoundWave using BeginGeneratingSoundWaveFromBuffer, BeginWriteToSoundWave, or BeginWriteToWavFile on the game thread. This class uses an async task to generate and write the file to disk.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSoundWavePCMWriter
(
int32 InChunkSize |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | BeginGeneratingSoundWaveFromBuffer
(
const TSampleBuffer<>& InSampleBuffer, |
This kicks off an operation to write InSampleBuffer to SoundWaveToSaveTo. | |
| bool | BeginWriteToSoundWave
(
const FString& FileName, |
This kicks off an operation to write InSampleBuffer to a USoundWave asset at the specified file path relative to the project directory. | |
| bool | BeginWriteToWavFile
(
const TSampleBuffer<>& InSampleBuffer, |
This writes out the InSampleBuffer as a wav file at the path specified by FilePath and FileName. | |
| void | CancelWrite () |
Aborts the current write operation. | |
| float | CheckStatus
(
ESoundWavePCMWriterState* OutCurrentState |
Call this on the game thread to continue the write operation. | |
| USoundWave * | Used to grab the a handle to the soundwave. | ||
| bool | IsDone () |
Whether we have finished the write operation, by either succeeding, failing, or being cancelled. | |
| void | Reset () |
Clean up all resources used. | |
| void | SaveFinishedSoundWaveToPath
(
const FString& FileName, |
This function can be used after generating a USoundWave by calling BeginGeneratingSoundWaveFromBuffer to save the generated soundwave to an asset. | |
| USoundWave * | SynchronouslyWriteSoundWave
(
const TSampleBuffer<>& InSampleBuffer, |
This is a blocking call that will return the SoundWave generated from InSampleBuffer. |