FreeRDP
tsmf_alsa.c File Reference
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <winpr/crt.h>
#include <alsa/asoundlib.h>
#include <freerdp/types.h>
#include <freerdp/codec/dsp.h>
#include "tsmf_audio.h"

Functions

static BOOL tsmf_alsa_open_device (TSMFAlsaAudioDevice *alsa)
 
static BOOL tsmf_alsa_open (ITSMFAudioDevice *audio, const char *device)
 
static BOOL tsmf_alsa_set_format (ITSMFAudioDevice *audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample)
 
static BOOL tsmf_alsa_play (ITSMFAudioDevice *audio, const BYTE *src, UINT32 data_size)
 
static UINT64 tsmf_alsa_get_latency (ITSMFAudioDevice *audio)
 
static BOOL tsmf_alsa_flush (ITSMFAudioDevice *audio)
 
static void tsmf_alsa_free (ITSMFAudioDevice *audio)
 
 WINPR_ASSERT (sptr)
 
 if (!alsa) return ERROR_OUTOFMEMORY
 

Variables

sptr = NULL
 
TSMFAlsaAudioDevice * alsa = calloc(1, sizeof(TSMFAlsaAudioDevice))
 
alsa iface Open = tsmf_alsa_open
 
alsa iface SetFormat = tsmf_alsa_set_format
 
alsa iface Play = tsmf_alsa_play
 
alsa iface GetLatency = tsmf_alsa_get_latency
 
alsa iface Flush = tsmf_alsa_flush
 
alsa iface Free = tsmf_alsa_free
 
return CHANNEL_RC_OK
 

Function Documentation

◆ if()

if ( alsa)

◆ tsmf_alsa_flush()

static BOOL tsmf_alsa_flush ( ITSMFAudioDevice *  audio)
static

◆ tsmf_alsa_free()

static void tsmf_alsa_free ( ITSMFAudioDevice *  audio)
static

◆ tsmf_alsa_get_latency()

static UINT64 tsmf_alsa_get_latency ( ITSMFAudioDevice *  audio)
static

◆ tsmf_alsa_open()

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

◆ tsmf_alsa_open_device()

static BOOL tsmf_alsa_open_device ( TSMFAlsaAudioDevice *  alsa)
static
Here is the caller graph for this function:

◆ tsmf_alsa_play()

static BOOL tsmf_alsa_play ( ITSMFAudioDevice *  audio,
const BYTE src,
UINT32  data_size 
)
static
Here is the call graph for this function:

◆ tsmf_alsa_set_format()

static BOOL tsmf_alsa_set_format ( ITSMFAudioDevice *  audio,
UINT32  sample_rate,
UINT32  channels,
UINT32  bits_per_sample 
)
static

◆ WINPR_ASSERT()

WINPR_ASSERT ( sptr  )

Variable Documentation

◆ alsa

TSMFAlsaAudioDevice* alsa = calloc(1, sizeof(TSMFAlsaAudioDevice))

◆ CHANNEL_RC_OK

return CHANNEL_RC_OK

◆ Flush

alsa iface Flush = tsmf_alsa_flush

◆ Free

alsa iface Free = tsmf_alsa_free

◆ GetLatency

alsa iface GetLatency = tsmf_alsa_get_latency

◆ Open

alsa iface Open = tsmf_alsa_open

◆ Play

alsa iface Play = tsmf_alsa_play

◆ SetFormat

alsa iface SetFormat = tsmf_alsa_set_format

◆ sptr

* sptr = NULL