EHS
Loading...
Searching...
No Matches
ehs::Audio Class Reference

#include <Audio.h>

Inheritance diagram for ehs::Audio:
ehs::Resource ehs::BaseObj

Public Member Functions

 ~Audio () override
 
 Audio ()
 
 Audio (const Str_8 &filePath)
 
 Audio (const Str_8 &filePath, DataType type)
 
 Audio (Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, UInt_64 frames, const Byte *data)
 
 Audio (Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, const Serializer< UInt_64 > &data)
 
 Audio (Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, const Vector< Byte > &data)
 
 Audio (Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, const Array< Byte > &data)
 
 Audio (Str_8 id, UInt_64 sampleRate, DataType dataType, UInt_8 channels, UInt_64 frames)
 
 Audio (Audio &&audio) noexcept
 
 Audio (const Audio &audio)
 
Audiooperator= (Audio &&audio) noexcept
 
Audiooperator= (const Audio &audio)
 
 operator const Byte * () const
 
 operator Byte * ()
 
void Release () override
 
UInt_64 GetSampleRate () const
 
DataType GetDataType () const
 
UInt_8 GetByteDepth () const
 
UInt_8 GetBitDepth () const
 
UInt_8 GetChannels () const
 
UInt_64 GetFrameCount () const
 
UInt_64 GetSampleCount () const
 
UInt_8 GetFrameSize () const
 
UInt_64 GetSize () const
 
float GetLength () const
 
ByteGetFrame (UInt_64 frameIndex) const
 
Array< ByteFrameAsMono (UInt_64 frameIndex) const
 
Array< ByteFrameAsStereo (UInt_64 frameIndex) const
 
Array< ByteFrameAsFive_One (UInt_64 frameIndex) const
 
Array< ByteFrameAsSeven_One (UInt_64 frameIndex) const
 
SInt_8 SampleAsSInt_8 (UInt_64 sampleIndex) const
 
SInt_16 SampleAsSInt_16 (UInt_64 sampleIndex) const
 
float SampleAsFloat (UInt_64 sampleIndex) const
 
SInt_32 SampleAsSInt_32 (UInt_64 sampleIndex) const
 
SInt_64 SampleAsSInt_64 (UInt_64 sampleIndex) const
 
SInt_8 PeakAsSInt_8 () const
 
SInt_16 PeakAsSInt_16 () const
 
float PeakAsFloat () const
 
SInt_32 PeakAsSInt_32 () const
 
SInt_64 PeakAsSInt_64 () const
 
void SetPeak (UInt_64 size, const Byte *newPeak)
 
const ByteGetPeak () const
 
void ToDataType (DataType newDataType)
 
Audio GetAsDataType (DataType newDataType) const
 
void ToChannels (UInt_8 newChannels)
 
Audio GetAsChannels (UInt_8 newChannels) const
 
bool Export (const Str_8 &filePath) const
 
- Public Member Functions inherited from ehs::Resource
 Resource ()
 
 Resource (ehs::Str_8 id)
 
 Resource (Resource &&rsrc) noexcept
 
 Resource (const Resource &rsrc)
 
Resourceoperator= (Resource &&rsrc) noexcept
 
Resourceoperator= (const Resource &rsrc)
 
bool operator== (ehs::UInt_64 otherHashId) const
 
bool operator!= (ehs::UInt_64 otherHashId) const
 
void SetId (ehs::Str_8 newId)
 
ehs::UInt_64 GetHashId () const
 
ehs::Str_8 GetId () const
 
virtual bool IsValid () const
 
ResourceClone () const override
 
- Public Member Functions inherited from ehs::BaseObj
virtual ~BaseObj ()
 
 BaseObj ()
 
 BaseObj (BaseObj &&base) noexcept
 
 BaseObj (const BaseObj &base)
 
BaseObjoperator= (BaseObj &&base) noexcept
 
BaseObjoperator= (const BaseObj &base)
 
bool operator== (const BaseObj &base) const
 
bool operator!= (const BaseObj &base) const
 
const TypeGetHierarchy () const
 
UInt_64 GetHierarchySize () const
 
bool HasType (UInt_64 typeHashId) const
 
bool HasType (const Char_8 *typeId) const
 
Type GetType () const
 
UInt_64 GetTypeIdSize () const
 
const Char_8GetTypeId () const
 
UInt_64 GetTypeHashId () const
 

Static Public Member Functions

static bool HasCodec (UInt_64 hashExt)
 
static bool HasCodec (const Str_8 &ext)
 
static bool AddCodec (AudioCodec codec)
 
static const AudioCodecGetCodec (UInt_64 hashExt)
 
static const AudioCodecGetCodec (const Str_8 &ext)
 

Additional Inherited Members

- Protected Member Functions inherited from ehs::BaseObj
void AddType (const Char_8 *id)
 

Constructor & Destructor Documentation

◆ ~Audio()

ehs::Audio::~Audio ( )
override

◆ Audio() [1/10]

ehs::Audio::Audio ( )

◆ Audio() [2/10]

ehs::Audio::Audio ( const Str_8 & filePath)

◆ Audio() [3/10]

ehs::Audio::Audio ( const Str_8 & filePath,
DataType type )

◆ Audio() [4/10]

ehs::Audio::Audio ( Str_8 id,
UInt_64 sampleRate,
DataType dataType,
UInt_8 channels,
UInt_64 frames,
const Byte * data )

◆ Audio() [5/10]

ehs::Audio::Audio ( Str_8 id,
UInt_64 sampleRate,
DataType dataType,
UInt_8 channels,
const Serializer< UInt_64 > & data )

◆ Audio() [6/10]

ehs::Audio::Audio ( Str_8 id,
UInt_64 sampleRate,
DataType dataType,
UInt_8 channels,
const Vector< Byte > & data )

◆ Audio() [7/10]

ehs::Audio::Audio ( Str_8 id,
UInt_64 sampleRate,
DataType dataType,
UInt_8 channels,
const Array< Byte > & data )

◆ Audio() [8/10]

ehs::Audio::Audio ( Str_8 id,
UInt_64 sampleRate,
DataType dataType,
UInt_8 channels,
UInt_64 frames )

◆ Audio() [9/10]

ehs::Audio::Audio ( Audio && audio)
noexcept

◆ Audio() [10/10]

ehs::Audio::Audio ( const Audio & audio)

Member Function Documentation

◆ AddCodec()

bool ehs::Audio::AddCodec ( AudioCodec codec)
static

◆ Export()

bool ehs::Audio::Export ( const Str_8 & filePath) const

◆ FrameAsFive_One()

Array< Byte > ehs::Audio::FrameAsFive_One ( UInt_64 frameIndex) const

◆ FrameAsMono()

Array< Byte > ehs::Audio::FrameAsMono ( UInt_64 frameIndex) const

◆ FrameAsSeven_One()

Array< Byte > ehs::Audio::FrameAsSeven_One ( UInt_64 frameIndex) const

◆ FrameAsStereo()

Array< Byte > ehs::Audio::FrameAsStereo ( UInt_64 frameIndex) const

◆ GetAsChannels()

Audio ehs::Audio::GetAsChannels ( UInt_8 newChannels) const

◆ GetAsDataType()

Audio ehs::Audio::GetAsDataType ( DataType newDataType) const

◆ GetBitDepth()

UInt_8 ehs::Audio::GetBitDepth ( ) const

◆ GetByteDepth()

UInt_8 ehs::Audio::GetByteDepth ( ) const

◆ GetChannels()

UInt_8 ehs::Audio::GetChannels ( ) const

◆ GetCodec() [1/2]

const AudioCodec * ehs::Audio::GetCodec ( const Str_8 & ext)
static

◆ GetCodec() [2/2]

const AudioCodec * ehs::Audio::GetCodec ( UInt_64 hashExt)
static

◆ GetDataType()

DataType ehs::Audio::GetDataType ( ) const

◆ GetFrame()

Byte * ehs::Audio::GetFrame ( UInt_64 frameIndex) const

◆ GetFrameCount()

UInt_64 ehs::Audio::GetFrameCount ( ) const

◆ GetFrameSize()

UInt_8 ehs::Audio::GetFrameSize ( ) const

◆ GetLength()

float ehs::Audio::GetLength ( ) const

◆ GetPeak()

const Byte * ehs::Audio::GetPeak ( ) const

◆ GetSampleCount()

UInt_64 ehs::Audio::GetSampleCount ( ) const

◆ GetSampleRate()

UInt_64 ehs::Audio::GetSampleRate ( ) const

◆ GetSize()

UInt_64 ehs::Audio::GetSize ( ) const

◆ HasCodec() [1/2]

bool ehs::Audio::HasCodec ( const Str_8 & ext)
static

◆ HasCodec() [2/2]

bool ehs::Audio::HasCodec ( UInt_64 hashExt)
static

◆ operator Byte *()

ehs::Audio::operator Byte * ( )

◆ operator const Byte *()

ehs::Audio::operator const Byte * ( ) const

◆ operator=() [1/2]

Audio & ehs::Audio::operator= ( Audio && audio)
noexcept

◆ operator=() [2/2]

Audio & ehs::Audio::operator= ( const Audio & audio)

◆ PeakAsFloat()

float ehs::Audio::PeakAsFloat ( ) const

◆ PeakAsSInt_16()

SInt_16 ehs::Audio::PeakAsSInt_16 ( ) const

◆ PeakAsSInt_32()

SInt_32 ehs::Audio::PeakAsSInt_32 ( ) const

◆ PeakAsSInt_64()

SInt_64 ehs::Audio::PeakAsSInt_64 ( ) const

◆ PeakAsSInt_8()

SInt_8 ehs::Audio::PeakAsSInt_8 ( ) const

◆ Release()

void ehs::Audio::Release ( )
overridevirtual

Reimplemented from ehs::Resource.

◆ SampleAsFloat()

float ehs::Audio::SampleAsFloat ( UInt_64 sampleIndex) const

◆ SampleAsSInt_16()

SInt_16 ehs::Audio::SampleAsSInt_16 ( UInt_64 sampleIndex) const

◆ SampleAsSInt_32()

SInt_32 ehs::Audio::SampleAsSInt_32 ( UInt_64 sampleIndex) const

◆ SampleAsSInt_64()

SInt_64 ehs::Audio::SampleAsSInt_64 ( UInt_64 sampleIndex) const

◆ SampleAsSInt_8()

SInt_8 ehs::Audio::SampleAsSInt_8 ( UInt_64 sampleIndex) const

◆ SetPeak()

void ehs::Audio::SetPeak ( UInt_64 size,
const Byte * newPeak )

◆ ToChannels()

void ehs::Audio::ToChannels ( UInt_8 newChannels)

◆ ToDataType()

void ehs::Audio::ToDataType ( DataType newDataType)

The documentation for this class was generated from the following files: