|
hydrogen 1.2.6
|
PulseAudio driver. More...
#include <PulseAudioDriver.h>
Public Member Functions | |
| PulseAudioDriver (audioProcessCallback processCallback) | |
| ~PulseAudioDriver () | |
| virtual int | connect () override |
| virtual void | disconnect () override |
| virtual unsigned | getBufferSize () override |
| virtual float * | getOut_L () override |
| virtual float * | getOut_R () override |
| virtual unsigned | getSampleRate () override |
| virtual int | init (unsigned nBufferSize) override |
Public Member Functions inherited from Object< PulseAudioDriver > | |
| Object () | |
| Object (const Object< PulseAudioDriver > &other) | |
Public Member Functions inherited from Base | |
| Base () | |
| Base (const Base &other) | |
| virtual const char * | class_name () const |
| void | logBacktrace () const |
| Print the current stack at point into the debug log. | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. | |
| virtual QString | toQString (const QString &sPrefix="", bool bShort=true) const |
| Formatted string version for debugging purposes. | |
Public Member Functions inherited from AudioOutput | |
| AudioOutput ()=default | |
| virtual | ~AudioOutput () |
| virtual int | getLatency () |
| Approximate audio latency (in frames) A reasonable approximation is the buffer time on most audio systems. | |
| virtual int | getXRuns () const |
| Get the number of XRuns that occurred since the audio driver has started. | |
Public Member Functions inherited from Object< AudioOutput > | |
| Object () | |
| Object (const Object< AudioOutput > &other) | |
Private Member Functions | |
| int | thread_body () |
Static Private Member Functions | |
| static void | ctx_state_callback (pa_context *ctx, void *udata) |
| static void | pipe_callback (pa_mainloop_api *, pa_io_event *, int fd, pa_io_event_flags_t events, void *udata) |
| static void * | s_thread_body (void *) |
| static void | stream_state_callback (pa_stream *stream, void *udata) |
| static void | stream_write_callback (pa_stream *stream, size_t bytes, void *udata) |
Private Attributes | |
| unsigned | m_buffer_size |
| audioProcessCallback | m_callback |
| pthread_cond_t | m_cond |
| bool | m_connected |
| pa_context * | m_ctx |
| pa_mainloop * | m_main_loop |
| pthread_mutex_t | m_mutex |
| float * | m_outL |
| float * | m_outR |
| int | m_pipe [2] |
| File descriptors used to write data to (m_pipe[1]) and read data from (m_pipe[0]) the pipe. | |
| int | m_ready |
| unsigned | m_sample_rate |
| pa_stream * | m_stream |
| pthread_t | m_thread |
Additional Inherited Members | |
Static Public Member Functions inherited from Base | |
| static const char * | _class_name () |
| return the class name | |
| static QString | base_clock (const QString &sMsg) |
| Measures the current time and stores it in __last_clock. | |
| static QString | base_clock_in (const QString &sMsg) |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! | |
| static bool | count_active () |
| static int | getAliveObjectCount () |
| static object_map_t | getObjectMap () |
| static Logger * | logger () |
| return the logger instance | |
| static int | objects_count () |
| static void | printObjectMapDiff (object_map_t map) |
| Creates the difference between a snapshot of the object map and its current state and prints it to std::cout. | |
| static void | set_count (bool flag) |
| enable/disable class instances counting | |
| static void | write_objects_map_to (std::ostream &out, object_map_t *map=nullptr) |
| output the full objects map to a given ostream | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr | |
Static Public Member Functions inherited from AudioOutput | |
| static QStringList | getDevices () |
Static Public Attributes inherited from Base | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. | |
Protected Member Functions inherited from Object< PulseAudioDriver > | |
| ~Object () | |
Protected Member Functions inherited from Base | |
| ~Base () | |
Protected Member Functions inherited from Object< AudioOutput > | |
| ~Object () | |
Static Protected Member Functions inherited from Base | |
| static void | registerClass (const char *name, const atomic_obj_cpt_t *counters) |
Static Protected Attributes inherited from Base | |
| static bool | __count = false |
| should we count class instances | |
| static timeval | __last_clock = { 0, 0 } |
| static Logger * | __logger = nullptr |
| static bool | bLogColors = true |
PulseAudio driver.
Definition at line 42 of file PulseAudioDriver.h.
| PulseAudioDriver | ( | audioProcessCallback | processCallback | ) |
Definition at line 34 of file PulseAudioDriver.cpp.
| ~PulseAudioDriver | ( | ) |
Definition at line 49 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 70 of file PulseAudioDriver.cpp.
|
staticprivate |
Definition at line 196 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 113 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 128 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 140 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 146 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 134 of file PulseAudioDriver.cpp.
|
overridevirtual |
Implements AudioOutput.
Definition at line 58 of file PulseAudioDriver.cpp.
|
staticprivate |
Definition at line 269 of file PulseAudioDriver.cpp.
|
staticprivate |
Definition at line 151 of file PulseAudioDriver.cpp.
|
staticprivate |
Definition at line 223 of file PulseAudioDriver.cpp.
|
staticprivate |
Definition at line 240 of file PulseAudioDriver.cpp.
|
private |
Definition at line 167 of file PulseAudioDriver.cpp.
|
private |
Definition at line 71 of file PulseAudioDriver.h.
|
private |
Definition at line 64 of file PulseAudioDriver.h.
|
private |
Definition at line 60 of file PulseAudioDriver.h.
|
private |
Definition at line 68 of file PulseAudioDriver.h.
|
private |
Definition at line 66 of file PulseAudioDriver.h.
|
private |
Definition at line 65 of file PulseAudioDriver.h.
|
private |
Definition at line 59 of file PulseAudioDriver.h.
|
private |
Definition at line 72 of file PulseAudioDriver.h.
|
private |
Definition at line 73 of file PulseAudioDriver.h.
|
private |
File descriptors used to write data to (m_pipe[1]) and read data from (m_pipe[0]) the pipe.
Definition at line 63 of file PulseAudioDriver.h.
|
private |
Definition at line 69 of file PulseAudioDriver.h.
|
private |
Definition at line 70 of file PulseAudioDriver.h.
|
private |
Definition at line 67 of file PulseAudioDriver.h.
|
private |
Definition at line 58 of file PulseAudioDriver.h.