pianod2
multisource multiuser scriptable networked music player
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Audio::AudioFormat Struct Reference

Audio format, somewhat ripped off from libao. More...

#include <audiooutput.h>

Public Member Functions

SampleArrangement realArrangement () const
 Return the byte ordering scheme, translating "native" ordering into big or little or an exception. More...
 
bool isNativeArrangement () const
 Determine whether the byte ordering matches the native ordering. More...
 
int sampleGroupSize () const
 Get the size of sample data. More...
 

Static Public Member Functions

static SampleArrangement nativeArrangement (int bits)
 Determine the byte ordering of the machine. More...
 

Public Attributes

int bits = 16
 Bits per sample in a single channel More...
 
int rate = 44100
 Samples per second in a single channel More...
 
int channels = 2
 
SampleArrangement arrangement = SampleArrangement::Native
 
SampleSignedness signedness = Signed
 

Detailed Description

Audio format, somewhat ripped off from libao.

Member Function Documentation

◆ isNativeArrangement()

bool Audio::AudioFormat::isNativeArrangement ( ) const

Determine whether the byte ordering matches the native ordering.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nativeArrangement()

SampleArrangement Audio::AudioFormat::nativeArrangement ( int  bits)
static

Determine the byte ordering of the machine.

Here is the caller graph for this function:

◆ realArrangement()

SampleArrangement Audio::AudioFormat::realArrangement ( ) const

Return the byte ordering scheme, translating "native" ordering into big or little or an exception.

Returns
Big or Little endian.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sampleGroupSize()

int Audio::AudioFormat::sampleGroupSize ( ) const
inline

Get the size of sample data.

Returns
Number of channels * sizeof (individual channel's sample).
Here is the caller graph for this function:

Member Data Documentation

◆ arrangement

SampleArrangement Audio::AudioFormat::arrangement = SampleArrangement::Native

◆ bits

int Audio::AudioFormat::bits = 16

Bits per sample in a single channel

◆ channels

int Audio::AudioFormat::channels = 2

◆ rate

int Audio::AudioFormat::rate = 44100

Samples per second in a single channel

◆ signedness

SampleSignedness Audio::AudioFormat::signedness = Signed

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