pianod2
multisource multiuser scriptable networked music player
Classes | Enumerations | Functions | Variables
Audio Namespace Reference

Classes dealing with audio output drivers and decoding/playing audio files. More...

Classes

class  AudioException
 Exception for audio output problems. More...
 
struct  AudioFormat
 Audio format, somewhat ripped off from libao. More...
 
class  AvDeviceOutput
 Output class for libavdevice. More...
 
class  AVFoundationPlayer
 Base class for OS X's AVFoundation audio player. More...
 
class  GstreamerAudioException
 Exception for gstreamer audio output problems. More...
 
class  GstreamerDoublePipeline
 Class for gstreamer pipelines that need sources wired to downstream elements dynamically when autoplugging. More...
 
class  GstreamerMediaReader
 Class for reading media streams via gstreamer. More...
 
class  GstreamerOutput
 Audio output class utilizing gstreamer for output. More...
 
class  GstreamerPlayer
 Play media or a stream using gstreamer. More...
 
class  GstreamerReaderWithBus
 Base class for gstreamer pipelines, both readers and outputs. More...
 
class  GstreamerSimplePipeline
 Base class for gstreamer pipelines. More...
 
class  Initializer
 Initialize the audio output libraries; uninitialize on destruction. More...
 
class  LavAdapter
 Adapter to feed a ffmpeg stream to an audio output. More...
 
class  LavAudioException
 Exception for ffmpeg audio output problems. More...
 
class  LavGenericAdapter
 Adapter to feed a ffmpeg stream to a generic audio output. More...
 
class  LavPlayer
 ffmpeg audio player More...
 
class  LibaoOutput
 Audio output class utilizing libao for output. More...
 
class  LibavMediaReader
 Base class for reading media streams via ffmpeg. More...
 
class  LibsdlOutput
 Audio output class utilizing SDL for output. More...
 
class  Output
 Base audio output class (abstract). More...
 

Enumerations

enum  SampleArrangement { Native, Big, Little }
 
enum  SampleSignedness { Signed, Unsigned }
 

Functions

static const AVOutputFormat * findDevice (const AudioSettings &settings)
 Find the audio output device. More...
 
void flogav (const char *func, int err)
 Log an ffmpeg error. More...
 
static void audio_fetch_callback (void *context, uint8_t *buffer, int length)
 The audio function callback takes the following parameters: buffer: A pointer to the audio buffer to be filled length: The length (in bytes) of the audio buffer. More...
 
Media::PlayergetAVFoundationPlayer (const AudioSettings &AudioSettings, const std::string &media_url, float initial_audio_gain)
 Old-style C interface to provide bridge from C++ to Objective-C compiled code. More...
 

Variables

union {
   unsigned char   Audio::bytes [4]
 
   uint32_t   Audio::value
 
B4_host_order = { { 0, 1, 2, 3 } }
 Constants to determine byte ordering on-the-fly. More...
 
union {
   unsigned char   Audio::bytes [2]
 
   uint16_t   Audio::value
 
B2_host_order = { { 0, 1 } }
 Constants to determine byte ordering of 2-byte values. More...
 

Detailed Description

Classes dealing with audio output drivers and decoding/playing audio files.

Enumeration Type Documentation

◆ SampleArrangement

Enumerator
Native 
Big 
Little 

◆ SampleSignedness

Enumerator
Signed 
Unsigned 

Function Documentation

◆ audio_fetch_callback()

static void Audio::audio_fetch_callback ( void *  context,
uint8_t *  buffer,
int  length 
)
static

The audio function callback takes the following parameters: buffer: A pointer to the audio buffer to be filled length: The length (in bytes) of the audio buffer.

Here is the caller graph for this function:

◆ findDevice()

static const AVOutputFormat* Audio::findDevice ( const AudioSettings settings)
static

Find the audio output device.

If a driver is specified in the settings, use that. Otherwise, use the first device found.

Parameters
settingsThe audio settings to match.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flogav()

void Audio::flogav ( const char *  func,
int  err 
)

Log an ffmpeg error.

Parameters
funcThe function name causing the error.
errThe ffmpeg error number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAVFoundationPlayer()

Media::Player * Audio::getAVFoundationPlayer ( const AudioSettings AudioSettings,
const std::string &  media_url,
float  initial_audio_gain 
)

Old-style C interface to provide bridge from C++ to Objective-C compiled code.

Here is the caller graph for this function:

Variable Documentation

◆ B2_host_order

const { ... } Audio::B2_host_order

Constants to determine byte ordering of 2-byte values.

◆ B4_host_order

const { ... } Audio::B4_host_order

Constants to determine byte ordering on-the-fly.

Credit to Cristoph

See also
http://stackoverflow.com/questions/2100331/c-macro-definition-to-determine-big-endian-or-little-endian-machine

◆ bytes

unsigned char Audio::bytes[2]

◆ value

uint16_t Audio::value