Lumiera  0.pre.03
»edit your freedom«
alsa.c File Reference

Go to the source code of this file.

Description

Example implementation how to access the ALSA sound backend.

Definition in file alsa.c.

#include "alsa.h"
#include <alsa/asoundlib.h>

Functions

void audio_init ()
 
size_t audio_offset ()
 
void audio_start (unsigned int rate, unsigned int channel_count)
 
void audio_stop ()
 
size_t audio_write (const void *data, size_t amount)
 

Variables

static int audio_initialised = 0
 
static snd_pcm_sframes_t buffer_size = 0
 
static snd_pcm_sframes_t delay = 0
 
static snd_pcm_hw_params_t * hw_params = 0
 
static snd_pcm_t * playback_handle = 0
 
static unsigned int rate = 44100
 
static snd_pcm_sw_params_t * sw_params = 0
 
static snd_pcm_sframes_t written = 0