FreeRDP
tsmf_pulse.c File Reference
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <winpr/crt.h>
#include <pulse/pulseaudio.h>
#include "tsmf_audio.h"

Functions

static void tsmf_pulse_context_state_callback (pa_context *context, void *userdata)
 
static BOOL tsmf_pulse_connect (TSMFPulseAudioDevice *pulse)
 
static BOOL tsmf_pulse_open (ITSMFAudioDevice *audio, const char *device)
 
static void tsmf_pulse_stream_success_callback (pa_stream *stream, int success, void *userdata)
 
static void tsmf_pulse_wait_for_operation (TSMFPulseAudioDevice *pulse, pa_operation *operation)
 
static void tsmf_pulse_stream_state_callback (pa_stream *stream, void *userdata)
 
static void tsmf_pulse_stream_request_callback (pa_stream *stream, size_t length, void *userdata)
 
static BOOL tsmf_pulse_close_stream (TSMFPulseAudioDevice *pulse)
 
static BOOL tsmf_pulse_open_stream (TSMFPulseAudioDevice *pulse)
 
static BOOL tsmf_pulse_set_format (ITSMFAudioDevice *audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample)
 
static BOOL tsmf_pulse_play (ITSMFAudioDevice *audio, const BYTE *data, UINT32 data_size)
 
static UINT64 tsmf_pulse_get_latency (ITSMFAudioDevice *audio)
 
static BOOL tsmf_pulse_flush (ITSMFAudioDevice *audio)
 
static void tsmf_pulse_free (ITSMFAudioDevice *audio)
 
 WINPR_ASSERT (sptr)
 
 if (!pulse) return ERROR_OUTOFMEMORY
 

Variables

sptr = NULL
 
TSMFPulseAudioDevice * pulse = (TSMFPulseAudioDevice*)calloc(1, sizeof(TSMFPulseAudioDevice))
 
pulse iface Open = tsmf_pulse_open
 
pulse iface SetFormat = tsmf_pulse_set_format
 
pulse iface Play = tsmf_pulse_play
 
pulse iface GetLatency = tsmf_pulse_get_latency
 
pulse iface Flush = tsmf_pulse_flush
 
pulse iface Free = tsmf_pulse_free
 
return CHANNEL_RC_OK
 

Function Documentation

◆ if()

if ( pulse)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsmf_pulse_close_stream()

static BOOL tsmf_pulse_close_stream ( TSMFPulseAudioDevice *  pulse)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsmf_pulse_connect()

static BOOL tsmf_pulse_connect ( TSMFPulseAudioDevice *  pulse)
static
Here is the caller graph for this function:

◆ tsmf_pulse_context_state_callback()

static void tsmf_pulse_context_state_callback ( pa_context *  context,
void *  userdata 
)
static
Here is the caller graph for this function:

◆ tsmf_pulse_flush()

static BOOL tsmf_pulse_flush ( ITSMFAudioDevice *  audio)
static
Here is the call graph for this function:

◆ tsmf_pulse_free()

static void tsmf_pulse_free ( ITSMFAudioDevice *  audio)
static
Here is the call graph for this function:

◆ tsmf_pulse_get_latency()

static UINT64 tsmf_pulse_get_latency ( ITSMFAudioDevice *  audio)
static

◆ tsmf_pulse_open()

static BOOL tsmf_pulse_open ( ITSMFAudioDevice *  audio,
const char *  device 
)
static
Here is the call graph for this function:

◆ tsmf_pulse_open_stream()

static BOOL tsmf_pulse_open_stream ( TSMFPulseAudioDevice *  pulse)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsmf_pulse_play()

static BOOL tsmf_pulse_play ( ITSMFAudioDevice *  audio,
const BYTE data,
UINT32  data_size 
)
static

◆ tsmf_pulse_set_format()

static BOOL tsmf_pulse_set_format ( ITSMFAudioDevice *  audio,
UINT32  sample_rate,
UINT32  channels,
UINT32  bits_per_sample 
)
static
Here is the call graph for this function:

◆ tsmf_pulse_stream_request_callback()

static void tsmf_pulse_stream_request_callback ( pa_stream *  stream,
size_t  length,
void *  userdata 
)
static
Here is the caller graph for this function:

◆ tsmf_pulse_stream_state_callback()

static void tsmf_pulse_stream_state_callback ( pa_stream *  stream,
void *  userdata 
)
static
Here is the caller graph for this function:

◆ tsmf_pulse_stream_success_callback()

static void tsmf_pulse_stream_success_callback ( pa_stream *  stream,
int  success,
void *  userdata 
)
static
Here is the caller graph for this function:

◆ tsmf_pulse_wait_for_operation()

static void tsmf_pulse_wait_for_operation ( TSMFPulseAudioDevice *  pulse,
pa_operation *  operation 
)
static
Here is the caller graph for this function:

◆ WINPR_ASSERT()

WINPR_ASSERT ( sptr  )

Variable Documentation

◆ CHANNEL_RC_OK

return CHANNEL_RC_OK

◆ Flush

pulse iface Flush = tsmf_pulse_flush

◆ Free

pulse iface Free = tsmf_pulse_free

◆ GetLatency

pulse iface GetLatency = tsmf_pulse_get_latency

◆ Open

pulse iface Open = tsmf_pulse_open

◆ Play

pulse iface Play = tsmf_pulse_play

◆ pulse

TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*)calloc(1, sizeof(TSMFPulseAudioDevice))

◆ SetFormat

pulse iface SetFormat = tsmf_pulse_set_format

◆ sptr

* sptr = NULL