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
IAudioEncoder.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 ~IAudioEncoder() = default;
27
34 virtual void ChangeFile(const std::filesystem::path& newAudioFilePath, const AudioFormatInfo& outputFormatInfo, bool overwrite) = 0;
35
40 virtual void CloseFile() = 0;
41
47 virtual bool IsFileOpen() const = 0;
48
53 virtual void Encode(const AudioBuffer& bufferToEncode) = 0;
54
61 virtual void Encode(const AudioBuffer& inputBuffer, EncodedAudioBuffer& outputBuffer) = 0;
62
69 virtual void Transcode(const EncodedAudioBuffer& inputBuffer, EncodedAudioBuffer& outputBuffer) = 0;
70 };
71}
#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 encoders.
Definition IAudioEncoder.h:16
virtual void CloseFile()=0
virtual void Transcode(const EncodedAudioBuffer &inputBuffer, EncodedAudioBuffer &outputBuffer)=0
virtual void Encode(const AudioBuffer &inputBuffer, EncodedAudioBuffer &outputBuffer)=0
virtual void Encode(const AudioBuffer &bufferToEncode)=0
std::filesystem::path filePath
Definition IAudioEncoder.h:22
virtual ~IAudioEncoder()=default
virtual void ChangeFile(const std::filesystem::path &newAudioFilePath, const AudioFormatInfo &outputFormatInfo, bool overwrite)=0
virtual bool IsFileOpen() const =0
stores the properties of the audio signals
Definition AudioFormatInfo.h:20