Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
gva::AudioSample Class Reference

The Audio Sample class. More...

#include <sample.h>

Inheritance diagram for gva::AudioSample:
Inheritance graph
Collaboration diagram for gva::AudioSample:
Collaboration graph

Data Structures

struct  CallbackData
 Construct a new Audio Sample object. More...
 

Public Member Functions

 AudioSample (const std::string_view filename)
 Construct a new Audio Sample object.
 
int32_t ReadBytes (uint8_t *buffer, const uint32_t bytes) final
 Destroy the Audio Sample object.
 
int32_t GetChannels () const final
 Get the Channels attribute.
 
int32_t GetSamplingRate () const final
 Get the Sampling Rate attribute.
 
void Seek (uint32_t bytes) final
 Get the Total Samples attribute.
 
- Public Member Functions inherited from gva::AudioSampleBase
virtual ~AudioSampleBase ()=default
 Destroy the Audio Sample Base object.
 

Detailed Description

The Audio Sample class.


Data Structure Documentation

◆ gva::AudioSample::CallbackData

struct gva::AudioSample::CallbackData

Construct a new Audio Sample object.

Collaboration diagram for gva::AudioSample::CallbackData:
Collaboration graph
Data Fields
SNDFILE * file The audio sample file.
SF_INFO info The audio sample info.

Constructor & Destructor Documentation

◆ AudioSample()

gva::AudioSample::AudioSample ( const std::string_view  filename)
explicit

Construct a new Audio Sample object.

Parameters
filenameThe filename of the audio sample

Member Function Documentation

◆ GetChannels()

int32_t gva::AudioSample::GetChannels ( ) const
finalvirtual

Get the Channels attribute.

Returns
int32_t number of channels

Implements gva::AudioSampleBase.

◆ GetSamplingRate()

int32_t gva::AudioSample::GetSamplingRate ( ) const
finalvirtual

Get the Sampling Rate attribute.

Returns
int32_t sampling rate

Implements gva::AudioSampleBase.

◆ ReadBytes()

int32_t gva::AudioSample::ReadBytes ( uint8_t *  buffer,
const uint32_t  bytes 
)
finalvirtual

Destroy the Audio Sample object.

Parameters
bufferThe buffer to read into
bytesThe number of bytes to read
Returns
int32_t bytes read

Implements gva::AudioSampleBase.

◆ Seek()

void gva::AudioSample::Seek ( uint32_t  bytes)
finalvirtual

Get the Total Samples attribute.

Parameters
bytesThe number of bytes to read

Implements gva::AudioSampleBase.


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