implements audio decoding via FFmpeg.
More...
#include <FFmpegAudioDecoder.h>
implements audio decoding via FFmpeg.
◆ FFmpegAudioDecoder() [1/3]
HephAudio::FFmpegAudioDecoder::FFmpegAudioDecoder |
( |
| ) |
|
creates a new instance and initializes it with default values.
◆ FFmpegAudioDecoder() [2/3]
HephAudio::FFmpegAudioDecoder::FFmpegAudioDecoder |
( |
const std::filesystem::path & | filePath | ) |
|
creates a new instance and initializes it with the provided values.
- Parameters
-
filePath | path of the file that will be decoded. |
◆ FFmpegAudioDecoder() [3/3]
creates a new instance and moves the rhs's data to it.
- Parameters
-
rhs | instance whose data will be moved. |
◆ ~FFmpegAudioDecoder()
HephAudio::FFmpegAudioDecoder::~FFmpegAudioDecoder |
( |
| ) |
|
releases the resources and destroys the instance.
◆ ChangeFile()
void HephAudio::FFmpegAudioDecoder::ChangeFile |
( |
const std::filesystem::path & | newFilePath | ) |
|
|
overridevirtual |
◆ CloseFile()
void HephAudio::FFmpegAudioDecoder::CloseFile |
( |
| ) |
|
|
overridevirtual |
closes the file that's being decoded and releases the resources allocated for decoding.
Implements HephAudio::IAudioDecoder.
◆ IsFileOpen()
bool HephAudio::FFmpegAudioDecoder::IsFileOpen |
( |
| ) |
const |
|
overridevirtual |
checks whether a file is currently open for decoding.
- Returns
- true if a file is currently open, otherwise false.
Implements HephAudio::IAudioDecoder.
◆ GetOutputFormatInfo()
AudioFormatInfo HephAudio::FFmpegAudioDecoder::GetOutputFormatInfo |
( |
| ) |
const |
|
overridevirtual |
◆ GetFrameCount()
size_t HephAudio::FFmpegAudioDecoder::GetFrameCount |
( |
| ) |
const |
|
overridevirtual |
◆ Seek()
bool HephAudio::FFmpegAudioDecoder::Seek |
( |
size_t | frameIndex | ) |
|
|
overridevirtual |
seeks an audio frame in the file.
- Parameters
-
frameIndex | index of the audio frame. |
- Returns
- true if the frame is found, otherwise false.
Implements HephAudio::IAudioDecoder.
◆ Decode() [1/4]
◆ Decode() [2/4]
AudioBuffer HephAudio::FFmpegAudioDecoder::Decode |
( |
size_t | frameCount | ) |
|
|
overridevirtual |
◆ Decode() [3/4]
AudioBuffer HephAudio::FFmpegAudioDecoder::Decode |
( |
size_t | frameIndex, |
|
|
size_t | frameCount ) |
|
overridevirtual |
decodes the specified portion of the audio file.
- Parameters
-
frameIndex | index of the first frame that will be decoded. |
frameCount | number of frames to decode. |
Implements HephAudio::IAudioDecoder.
◆ Decode() [4/4]
decodes the encoded audio data in the memory.
- Parameters
-
encodedBuffer | the buffer that contains the encoded audio data. |
Implements HephAudio::IAudioDecoder.