implements audio encoding via FFmpeg.
More...
#include <FFmpegAudioEncoder.h>
|
static void | Transcode (const std::filesystem::path &inputFilePath, const std::filesystem::path &outputFilePath, bool overwrite) |
|
static void | Transcode (const std::filesystem::path &inputFilePath, const std::filesystem::path &outputFilePath, AudioFormatInfo outputFormatInfo, bool overwrite) |
|
implements audio encoding via FFmpeg.
◆ FFmpegAudioEncoder() [1/3]
HephAudio::FFmpegAudioEncoder::FFmpegAudioEncoder |
( |
| ) |
|
creates a new instance and initializes it with default values.
◆ FFmpegAudioEncoder() [2/3]
HephAudio::FFmpegAudioEncoder::FFmpegAudioEncoder |
( |
const std::filesystem::path & | filePath, |
|
|
const AudioFormatInfo & | outputFormatInfo, |
|
|
bool | overwrite ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
filePath | path of the file that will be decoded. |
outputFormatInfo | describes the output format. |
overwrite | indicates whether to write over the file if already exists. |
◆ FFmpegAudioEncoder() [3/3]
creates a new instance and moves the rhs's data to it.
- Parameters
-
rhs | instance whose data will be moved. |
◆ ~FFmpegAudioEncoder()
HephAudio::FFmpegAudioEncoder::~FFmpegAudioEncoder |
( |
| ) |
|
releases the resources and destroys the instance.
◆ ChangeFile()
void HephAudio::FFmpegAudioEncoder::ChangeFile |
( |
const std::filesystem::path & | newAudioFilePath, |
|
|
const AudioFormatInfo & | outputFormatInfo, |
|
|
bool | overwrite ) |
|
overridevirtual |
changes the file that will store the encoded audio data.
- Parameters
-
outputFormatInfo | target format. |
overwrite | indicates whether to write over the file if it already exists. |
Implements HephAudio::IAudioEncoder.
◆ CloseFile()
void HephAudio::FFmpegAudioEncoder::CloseFile |
( |
| ) |
|
|
overridevirtual |
◆ IsFileOpen()
bool HephAudio::FFmpegAudioEncoder::IsFileOpen |
( |
| ) |
const |
|
overridevirtual |
checks whether a file is currently open.
- Returns
- true if a file is currently open, otherwise false.
Implements HephAudio::IAudioEncoder.
◆ Encode() [1/2]
void HephAudio::FFmpegAudioEncoder::Encode |
( |
const AudioBuffer & | bufferToEncode | ) |
|
|
overridevirtual |
◆ Encode() [2/2]
encodes the provided audio data and writes it to the outputBuffer.
- Parameters
-
inputBuffer | the buffer that contains the audio data that will be encoded. |
outputBuffer | the buffer that will store the encoded audio data. |
Implements HephAudio::IAudioEncoder.
◆ Transcode()
transcodes the provided audio data and writes it to the outputBuffer.
- Parameters
-
inputBuffer | the buffer that contains the audio data that will be transcoded. |
outputBuffer | the buffer that will store the transcoded audio data. |
Implements HephAudio::IAudioEncoder.