HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
stores encoded audio data. More...
#include <EncodedAudioBuffer.h>
Public Member Functions | |
EncodedAudioBuffer () | |
EncodedAudioBuffer (const AudioFormatInfo &formatInfo) | |
EncodedAudioBuffer (size_t size, const AudioFormatInfo &formatInfo) | |
EncodedAudioBuffer (const uint8_t *pData, size_t size, const AudioFormatInfo &formatInfo) | |
EncodedAudioBuffer (const EncodedAudioBuffer &)=delete | |
EncodedAudioBuffer (EncodedAudioBuffer &&rhs) noexcept | |
virtual | ~EncodedAudioBuffer ()=default |
EncodedAudioBuffer & | operator= (const EncodedAudioBuffer &)=delete |
EncodedAudioBuffer & | operator= (EncodedAudioBuffer &&rhs) noexcept |
virtual void | Release () override |
const AudioFormatInfo & | GetAudioFormatInfo () const |
void | SetAudioFormatInfo (const AudioFormatInfo &newFormatInfo) |
void | Add (const uint8_t *pData, size_t size) |
Protected Attributes | |
AudioFormatInfo | formatInfo |
Protected Attributes inherited from Heph::BufferBase< EncodedAudioBuffer, uint8_t > | |
uint8_t * | pData |
size_t | size |
Friends | |
class | Heph::BufferBase< EncodedAudioBuffer, uint8_t > |
Additional Inherited Members | |
Protected Member Functions inherited from Heph::BufferBase< EncodedAudioBuffer, uint8_t > | |
BufferBase () | |
BufferBase (size_t size) | |
BufferBase (size_t size, BufferFlags flags) | |
BufferBase (const std::initializer_list< uint8_t > &rhs) | |
BufferBase (const BufferBase &rhs) | |
BufferBase (BufferBase &&rhs) noexcept | |
EncodedAudioBuffer & | operator= (const std::initializer_list< uint8_t > &rhs) |
EncodedAudioBuffer & | operator= (const EncodedAudioBuffer &rhs) |
EncodedAudioBuffer & | operator= (EncodedAudioBuffer &&rhs) noexcept |
virtual | ~BufferBase () |
virtual EncodedAudioBuffer | operator<< (size_t rhs) const |
virtual EncodedAudioBuffer & | operator<<= (size_t rhs) |
virtual EncodedAudioBuffer | operator>> (size_t rhs) const |
virtual EncodedAudioBuffer & | operator>>= (size_t rhs) |
virtual bool | operator== (const EncodedAudioBuffer &rhs) const |
virtual bool | operator!= (const EncodedAudioBuffer &rhs) const |
uint8_t & | operator[] (size_t index) const |
size_t | Size () const |
size_t | SizeAsByte () const |
uint8_t & | At (size_t index) const |
virtual bool | IsEmpty () const |
virtual void | Reset () |
virtual EncodedAudioBuffer | SubBuffer (size_t index, size_t size) const |
virtual void | Prepend (const EncodedAudioBuffer &rhs) |
virtual void | Append (const EncodedAudioBuffer &rhs) |
virtual void | Insert (const EncodedAudioBuffer &rhs, size_t index) |
virtual void | Cut (size_t index, size_t size) |
virtual void | Replace (const EncodedAudioBuffer &rhs, size_t index) |
virtual void | Replace (const EncodedAudioBuffer &rhs, size_t index, size_t size) |
virtual void | Resize (size_t newSize) |
virtual void | Reverse () |
uint8_t * | begin () const |
uint8_t * | end () const |
Static Protected Member Functions inherited from Heph::BufferBase< EncodedAudioBuffer, uint8_t > | |
static size_t | SizeAsByte (size_t size) |
static uint8_t * | SubBuffer (uint8_t *pThisData, size_t thisSize_byte, size_t index_byte, size_t subBufferSize_byte) |
static uint8_t * | Prepend (uint8_t *pThisData, size_t thisSize_byte, uint8_t *pRhsData, size_t rhsSize_byte) |
static uint8_t * | Append (uint8_t *pThisData, size_t thisSize_byte, uint8_t *pRhsData, size_t rhsSize_byte) |
static uint8_t * | Insert (uint8_t *pThisData, size_t thisSize_byte, uint8_t *pRhsData, size_t rhsSize_byte, size_t index_byte) |
static uint8_t * | Cut (uint8_t *pThisData, size_t thisSize_byte, size_t index_byte, size_t &cutSize_byte) |
static void | Replace (uint8_t *pThisData, size_t thisSize_byte, uint8_t *pRhsData, size_t rhsSize_byte, size_t index_byte) |
static std::enable_if< std::is_class< U >::value >::type | Initialize (U *pData, U *pDataEnd) |
static std::enable_if<!std::is_class< U >::value >::type | Initialize (U *pData, U *pDataEnd) |
static uint8_t * | Allocate (size_t size_byte) |
static uint8_t * | AllocateUninitialized (size_t size_byte) |
stores encoded audio data.
HephAudio::EncodedAudioBuffer::EncodedAudioBuffer | ( | ) |
creates a new instance and initializes it with default values.
|
explicit |
creates a new instance and initializes it with the provided values.
formatInfo | audio format info of the encoded data. |
HephAudio::EncodedAudioBuffer::EncodedAudioBuffer | ( | size_t | size, |
const AudioFormatInfo & | formatInfo ) |
creates a new instance and initializes it with the provided values.
size | number of bytes the buffer will store. |
formatInfo | audio format info of the encoded data. |
HephAudio::EncodedAudioBuffer::EncodedAudioBuffer | ( | const uint8_t * | pData, |
size_t | size, | ||
const AudioFormatInfo & | formatInfo ) |
creates a new instance and initializes it with the provided values.
pData | pointer to the data that the buffer will store (copies the data). |
size | number of bytes the buffer will store. |
formatInfo | audio format info of the encoded data. |
|
delete |
creates a new instance and copies the rhs's data to it.
rhs | instance whose data will be copied. |
|
noexcept |
creates a new instance and moves the rhs's data to it.
rhs | instance whose data will be moved. |
|
virtualdefault |
releases the resources and destroys the instance.
|
overridevirtual |
releases the resources.
Reimplemented from Heph::BufferBase< EncodedAudioBuffer, uint8_t >.
Reimplemented in HephAudio::FFmpegEncodedAudioBuffer.
const AudioFormatInfo & HephAudio::EncodedAudioBuffer::GetAudioFormatInfo | ( | ) | const |
gets the AudioFormatInfo of the buffer.
void HephAudio::EncodedAudioBuffer::SetAudioFormatInfo | ( | const AudioFormatInfo & | newFormatInfo | ) |
sets the AudioFormatInfo of the buffer.
void HephAudio::EncodedAudioBuffer::Add | ( | const uint8_t * | pData, |
size_t | size ) |
adds encoded audio data to the end of the buffer.
pData | pointer to the encoded data that will be added. |
size | number of bytes that will be added. |
|
protected |
format of the encoded audio data.