vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
Audio Module

Audio and Alsa Interface. More...

Classes

class  cSoftHdAudio
 Audio Interface. More...
 
class  cPidController
 PID Controller. More...
 
class  cSoftHdRingbuffer
 Ringbuffer (FIFO) Implementation. More...
 

Macros

#define atomic_set(ptr, val)   __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)
 
#define atomic_read(ptr)   __atomic_load_n(ptr, __ATOMIC_SEQ_CST)
 
#define atomic_inc(ptr)   __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)
 
#define atomic_dec(ptr)   __atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)
 
#define atomic_add(val, ptr)   __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)
 
#define atomic_sub(val, ptr)   __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)
 

Typedefs

typedef volatile int atomic_t
 Atomic Wrapper Macros.
 

Functions

static const charalsaToFFmpegChannel (const char *alsaName)
 FFmpeg does not have channels called "RL" or "RR" So "rename" Alsas RL (rear left) and RR (rear right) to FFmpegs BL (back left) and BR (back right) to make the channelmap filter parser happy.
 
static std::vector< std::string > GetAlsaChannelLayoutAsArray (snd_pcm_t *pcmHandle)
 Put Alsa channel layout in a dynamic array of strings.
 
static std::vector< std::string > GetFFmpegChannelLayoutAsArray (const AVChannelLayout &layout)
 Put FFmpeg channel layout in a dynamic array of strings.
 
static bool LayoutsMatch (const std::vector< std::string > &ff, const std::vector< std::string > &alsa)
 Check, if FFmpeg and Alsa channel layout match.
 
static std::string BuildChannelMapFilter (snd_pcm_t *pcmHandle, const AVChannelLayout &layout)
 Build the "|"-separated mappings list for the channelmap filter.
 
static void AlsaNoopCallback (__attribute__((unused)) const char *file, __attribute__((unused)) int line, __attribute__((unused)) const char *function, __attribute__((unused)) int err, __attribute__((unused)) const char *fmt,...)
 Empty log callback.
 

Detailed Description

Audio and Alsa Interface.

Handles the audio stream and ALSA interface

Macro Definition Documentation

◆ atomic_add

#define atomic_add (   val,
  ptr 
)    __atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)

Definition at line 32 of file ringbuffer.h.

◆ atomic_dec

#define atomic_dec (   ptr)    __atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)

Definition at line 31 of file ringbuffer.h.

◆ atomic_inc

#define atomic_inc (   ptr)    __atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)

Definition at line 30 of file ringbuffer.h.

◆ atomic_read

#define atomic_read (   ptr)    __atomic_load_n(ptr, __ATOMIC_SEQ_CST)

Definition at line 29 of file ringbuffer.h.

◆ atomic_set

#define atomic_set (   ptr,
  val 
)    __atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)

Definition at line 28 of file ringbuffer.h.

◆ atomic_sub

#define atomic_sub (   val,
  ptr 
)    __atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)

Definition at line 33 of file ringbuffer.h.

Typedef Documentation

◆ atomic_t

Atomic Wrapper Macros.

atomic type, 24 bit useable

Definition at line 26 of file ringbuffer.h.

Function Documentation

◆ AlsaNoopCallback()

static void AlsaNoopCallback ( __attribute__((unused)) const char file,
__attribute__((unused)) int  line,
__attribute__((unused)) const char function,
__attribute__((unused)) int  err,
__attribute__((unused)) const char fmt,
  ... 
)
static

Empty log callback.

Definition at line 1916 of file audio.cpp.

Referenced by cSoftHdAudio::AlsaInit().

◆ alsaToFFmpegChannel()

static const char * alsaToFFmpegChannel ( const char alsaName)
static

FFmpeg does not have channels called "RL" or "RR" So "rename" Alsas RL (rear left) and RR (rear right) to FFmpegs BL (back left) and BR (back right) to make the channelmap filter parser happy.

Definition at line 325 of file audio.cpp.

Referenced by GetAlsaChannelLayoutAsArray().

◆ BuildChannelMapFilter()

static std::string BuildChannelMapFilter ( snd_pcm_t pcmHandle,
const AVChannelLayout layout 
)
static

Build the "|"-separated mappings list for the channelmap filter.

Parameters
pcmHandlecurrent Alsa PCM Handle
layoutcurrent FFmpeg channel layout
Returns
mapping string to feed into the channelmap filter

Definition at line 416 of file audio.cpp.

References GetAlsaChannelLayoutAsArray(), GetFFmpegChannelLayoutAsArray(), L_SOUND, LayoutsMatch(), LOGDEBUG2, and LOGWARNING.

Referenced by cSoftHdAudio::InitFilter().

◆ GetAlsaChannelLayoutAsArray()

static std::vector< std::string > GetAlsaChannelLayoutAsArray ( snd_pcm_t pcmHandle)
static

Put Alsa channel layout in a dynamic array of strings.

Parameters
pcmHandlecurrent Alsa PCM Handle
Returns
alsa channel layout as an array of strings

Definition at line 342 of file audio.cpp.

References alsaToFFmpegChannel().

Referenced by cSoftHdAudio::AlsaSetup(), and BuildChannelMapFilter().

◆ GetFFmpegChannelLayoutAsArray()

static std::vector< std::string > GetFFmpegChannelLayoutAsArray ( const AVChannelLayout layout)
static

Put FFmpeg channel layout in a dynamic array of strings.

Parameters
layoutcurrent FFmpeg channel layout
Returns
ffmpeg layout as an array of strings

Definition at line 368 of file audio.cpp.

Referenced by BuildChannelMapFilter().

◆ LayoutsMatch()

static bool LayoutsMatch ( const std::vector< std::string > &  ff,
const std::vector< std::string > &  alsa 
)
static

Check, if FFmpeg and Alsa channel layout match.

Parameters
ffArray of FFmpeg channel layout
alsaArray of Alsa channel layout
Returns
true if the channel layouts match

Definition at line 393 of file audio.cpp.

Referenced by BuildChannelMapFilter().