#include <audiooutputpulse.h>
Public Member Functions | |
| AudioOutputPulseAudio (const AudioSettings &settings) | |
| ~AudioOutputPulseAudio () | |
| int | GetVolumeChannel (int channel) const |
| void | SetVolumeChannel (int channel, int volume) |
| void | Drain (void) |
| Block until all available frames have been written to the device. | |
Protected Member Functions | |
| AudioOutputSettings * | GetOutputSettings (bool digital) |
| bool | OpenDevice (void) |
| void | CloseDevice (void) |
| void | WriteAudio (unsigned char *aubuf, int size) |
| int | GetBufferedOnSoundcard (void) const |
| Return the size in bytes of frames currently in the audio buffer adjusted with the audio playback latency. | |
Private Member Functions | |
| char * | ChooseHost (void) |
| bool | MapChannels (void) |
| bool | ContextConnect (void) |
| bool | ConnectPlaybackStream (void) |
| void | FlushStream (const char *caller) |
Static Private Member Functions | |
| static void | ContextStateCallback (pa_context *c, void *arg) |
| static void | StreamStateCallback (pa_stream *s, void *arg) |
| static void | OpCompletionCallback (pa_context *c, int ok, void *arg) |
| static void | WriteCallback (pa_stream *s, size_t size, void *arg) |
| static void | BufferFlowCallback (pa_stream *s, void *tag) |
| static void | ServerInfoCallback (pa_context *context, const pa_server_info *inf, void *arg) |
| static void | SinkInfoCallback (pa_context *c, const pa_sink_info *info, int eol, void *arg) |
Private Attributes | |
| pa_context * | pcontext |
| pa_stream * | pstream |
| pa_threaded_mainloop * | mainloop |
| pa_sample_spec | sample_spec |
| pa_channel_map | channel_map |
| pa_cvolume | volume_control |
| pa_buffer_attr | buffer_settings |
| AudioOutputSettings * | m_aosettings |
Definition at line 27 of file audiooutputpulse.h.
| AudioOutputPulseAudio::AudioOutputPulseAudio | ( | const AudioSettings & | settings | ) |
Definition at line 28 of file audiooutputpulse.cpp.
| AudioOutputPulseAudio::~AudioOutputPulseAudio | ( | ) |
Definition at line 44 of file audiooutputpulse.cpp.
| int AudioOutputPulseAudio::GetVolumeChannel | ( | int | channel | ) | const [virtual] |
Implements VolumeBase.
Definition at line 326 of file audiooutputpulse.cpp.
| void AudioOutputPulseAudio::SetVolumeChannel | ( | int | channel, | |
| int | volume | |||
| ) | [virtual] |
Implements VolumeBase.
Definition at line 332 of file audiooutputpulse.cpp.
| void AudioOutputPulseAudio::Drain | ( | void | ) | [virtual] |
Block until all available frames have been written to the device.
Reimplemented from AudioOutputBase.
Definition at line 387 of file audiooutputpulse.cpp.
| AudioOutputSettings * AudioOutputPulseAudio::GetOutputSettings | ( | bool | digital | ) | [protected, virtual] |
Reimplemented from AudioOutputBase.
Definition at line 54 of file audiooutputpulse.cpp.
| bool AudioOutputPulseAudio::OpenDevice | ( | void | ) | [protected, virtual] |
Implements AudioOutputBase.
Definition at line 121 of file audiooutputpulse.cpp.
| void AudioOutputPulseAudio::CloseDevice | ( | void | ) | [protected, virtual] |
Implements AudioOutputBase.
Definition at line 200 of file audiooutputpulse.cpp.
| void AudioOutputPulseAudio::WriteAudio | ( | unsigned char * | aubuf, | |
| int | size | |||
| ) | [protected] |
| int AudioOutputPulseAudio::GetBufferedOnSoundcard | ( | void | ) | const [protected, virtual] |
Return the size in bytes of frames currently in the audio buffer adjusted with the audio playback latency.
Implements AudioOutputBase.
Definition at line 288 of file audiooutputpulse.cpp.
| char * AudioOutputPulseAudio::ChooseHost | ( | void | ) | [private] |
Definition at line 477 of file audiooutputpulse.cpp.
Referenced by AudioOutputPulseAudio(), and ContextConnect().
| bool AudioOutputPulseAudio::MapChannels | ( | void | ) | [private] |
| bool AudioOutputPulseAudio::ContextConnect | ( | void | ) | [private] |
Definition at line 400 of file audiooutputpulse.cpp.
Referenced by GetOutputSettings(), and OpenDevice().
| bool AudioOutputPulseAudio::ConnectPlaybackStream | ( | void | ) | [private] |
Definition at line 525 of file audiooutputpulse.cpp.
Referenced by OpenDevice().
| void AudioOutputPulseAudio::FlushStream | ( | const char * | caller | ) | [private] |
Definition at line 616 of file audiooutputpulse.cpp.
Referenced by CloseDevice().
| void AudioOutputPulseAudio::ContextStateCallback | ( | pa_context * | c, | |
| void * | arg | |||
| ) | [static, private] |
Definition at line 628 of file audiooutputpulse.cpp.
Referenced by ContextConnect().
| void AudioOutputPulseAudio::StreamStateCallback | ( | pa_stream * | s, | |
| void * | arg | |||
| ) | [static, private] |
Definition at line 649 of file audiooutputpulse.cpp.
Referenced by ConnectPlaybackStream().
| void AudioOutputPulseAudio::OpCompletionCallback | ( | pa_context * | c, | |
| int | ok, | |||
| void * | arg | |||
| ) | [static, private] |
Definition at line 677 of file audiooutputpulse.cpp.
Referenced by SetVolumeChannel().
| void AudioOutputPulseAudio::WriteCallback | ( | pa_stream * | s, | |
| size_t | size, | |||
| void * | arg | |||
| ) | [static, private] |
Definition at line 666 of file audiooutputpulse.cpp.
Referenced by ConnectPlaybackStream().
| void AudioOutputPulseAudio::BufferFlowCallback | ( | pa_stream * | s, | |
| void * | tag | |||
| ) | [static, private] |
Definition at line 672 of file audiooutputpulse.cpp.
Referenced by ConnectPlaybackStream().
| void AudioOutputPulseAudio::ServerInfoCallback | ( | pa_context * | context, | |
| const pa_server_info * | inf, | |||
| void * | arg | |||
| ) | [static, private] |
Definition at line 690 of file audiooutputpulse.cpp.
Referenced by ContextConnect().
| void AudioOutputPulseAudio::SinkInfoCallback | ( | pa_context * | c, | |
| const pa_sink_info * | info, | |||
| int | eol, | |||
| void * | arg | |||
| ) | [static, private] |
Definition at line 702 of file audiooutputpulse.cpp.
Referenced by GetOutputSettings().
pa_context* AudioOutputPulseAudio::pcontext [private] |
Definition at line 61 of file audiooutputpulse.h.
Referenced by CloseDevice(), ConnectPlaybackStream(), ContextConnect(), GetBufferedOnSoundcard(), GetOutputSettings(), SetVolumeChannel(), and ~AudioOutputPulseAudio().
pa_stream* AudioOutputPulseAudio::pstream [private] |
Definition at line 62 of file audiooutputpulse.h.
Referenced by CloseDevice(), ConnectPlaybackStream(), Drain(), FlushStream(), GetBufferedOnSoundcard(), and SetVolumeChannel().
pa_threaded_mainloop* AudioOutputPulseAudio::mainloop [private] |
Definition at line 63 of file audiooutputpulse.h.
Referenced by CloseDevice(), ConnectPlaybackStream(), ContextConnect(), ContextStateCallback(), Drain(), FlushStream(), GetBufferedOnSoundcard(), GetOutputSettings(), OpCompletionCallback(), OpenDevice(), SetVolumeChannel(), SinkInfoCallback(), StreamStateCallback(), and WriteCallback().
pa_sample_spec AudioOutputPulseAudio::sample_spec [private] |
Definition at line 64 of file audiooutputpulse.h.
Referenced by ConnectPlaybackStream(), and OpenDevice().
pa_channel_map AudioOutputPulseAudio::channel_map [private] |
Definition at line 65 of file audiooutputpulse.h.
Referenced by ConnectPlaybackStream(), and OpenDevice().
pa_cvolume AudioOutputPulseAudio::volume_control [private] |
Definition at line 66 of file audiooutputpulse.h.
Referenced by AudioOutputPulseAudio(), ConnectPlaybackStream(), GetVolumeChannel(), OpenDevice(), and SetVolumeChannel().
pa_buffer_attr AudioOutputPulseAudio::buffer_settings [private] |
Definition at line 67 of file audiooutputpulse.h.
Referenced by ConnectPlaybackStream().
Definition at line 68 of file audiooutputpulse.h.
Referenced by GetOutputSettings(), and SinkInfoCallback().
1.6.3