HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
IAudioDecoder.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "AudioBuffer.h"
5#include <filesystem>
6
9namespace HephAudio
10{
16 {
17 protected:
22 std::filesystem::path filePath;
23
24 public:
26 virtual ~IAudioDecoder() = default;
27
32 virtual void ChangeFile(const std::filesystem::path& newFilePath) = 0;
33
38 virtual void CloseFile() = 0;
39
45 virtual bool IsFileOpen() const = 0;
46
52
57 virtual size_t GetFrameCount() const = 0;
58
66 virtual bool Seek(size_t frameIndex) = 0;
67
72 virtual AudioBuffer Decode() = 0;
73
80 virtual AudioBuffer Decode(size_t frameCount) = 0;
81
89 virtual AudioBuffer Decode(size_t frameIndex, size_t frameCount) = 0;
90
97 virtual AudioBuffer Decode(const EncodedAudioBuffer& encodedBuffer) = 0;
98 };
99}
#define HEPH_API
Definition HephShared.h:132
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
stores encoded audio data.
Definition EncodedAudioBuffer.h:15
interface for the audio decoders.
Definition IAudioDecoder.h:16
virtual AudioFormatInfo GetOutputFormatInfo() const =0
virtual size_t GetFrameCount() const =0
virtual bool Seek(size_t frameIndex)=0
virtual AudioBuffer Decode()=0
virtual AudioBuffer Decode(size_t frameIndex, size_t frameCount)=0
virtual AudioBuffer Decode(size_t frameCount)=0
virtual AudioBuffer Decode(const EncodedAudioBuffer &encodedBuffer)=0
virtual bool IsFileOpen() const =0
virtual ~IAudioDecoder()=default
virtual void ChangeFile(const std::filesystem::path &newFilePath)=0
std::filesystem::path filePath
Definition IAudioDecoder.h:22
virtual void CloseFile()=0
stores the properties of the audio signals
Definition AudioFormatInfo.h:20