vtest.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <alsa/asoundlib.h>

Go to the source code of this file.

Functions

void busywait (double secs)
double get_time (void)
int main (int argc, char **argv)
static void set_hwparams (snd_pcm_t *handle)
static void set_swparams (snd_pcm_t *handle)
void sound_init (void)
void sound_play (unsigned char *buf, int size)
int sound_step (void)
void usage (void)

Variables

static int buffer_size
int dsp_fd
snd_pcm_t * pcm
static int period_size
unsigned char * soundbuf
int soundbuf_off
int soundbuf_playing
int soundbuf_size
int soundbuf_used
int xrun_count


Function Documentation

void busywait ( double  secs  ) 

Definition at line 189 of file vtest.c.

References get_time().

double get_time ( void   ) 

Definition at line 181 of file vtest.c.

int main ( int  argc,
char **  argv 
)

Definition at line 205 of file vtest.c.

References c, TM::offset, TM::size, sound_init(), sound_play(), sound_step(), usage(), and xrun_count.

static void set_hwparams ( snd_pcm_t *  handle  )  [static]

Definition at line 20 of file vtest.c.

References buffer_size, and period_size.

Referenced by sound_init().

static void set_swparams ( snd_pcm_t *  handle  )  [static]

Definition at line 56 of file vtest.c.

References buffer_size, and period_size.

Referenced by sound_init().

void sound_init ( void   ) 

Definition at line 80 of file vtest.c.

References pcm, set_hwparams(), and set_swparams().

void sound_play ( unsigned char *  buf,
int  size 
)

Definition at line 149 of file vtest.c.

References buffer_size, pcm, sound_step(), soundbuf, soundbuf_off, soundbuf_playing, soundbuf_size, and soundbuf_used.

Referenced by main().

int sound_step ( void   ) 

Definition at line 105 of file vtest.c.

References pcm, period_size, soundbuf, soundbuf_off, soundbuf_playing, soundbuf_used, and xrun_count.

Referenced by main(), and sound_play().

void usage ( void   ) 

Definition at line 198 of file vtest.c.


Variable Documentation

int buffer_size [static]

Definition at line 16 of file vtest.c.

Referenced by set_hwparams(), set_swparams(), and sound_play().

int dsp_fd

Definition at line 14 of file vtest.c.

snd_pcm_t* pcm

Definition at line 77 of file vtest.c.

Referenced by mm_decode_audio(), sound_init(), sound_play(), and sound_step().

int period_size [static]

Definition at line 17 of file vtest.c.

Referenced by set_hwparams(), set_swparams(), and sound_step().

unsigned char* soundbuf

Definition at line 98 of file vtest.c.

int soundbuf_off

Definition at line 100 of file vtest.c.

Referenced by sound_play(), and sound_step().

int soundbuf_playing

Definition at line 101 of file vtest.c.

Referenced by sound_play(), and sound_step().

int soundbuf_size

Definition at line 97 of file vtest.c.

int soundbuf_used

Definition at line 99 of file vtest.c.

int xrun_count

Definition at line 12 of file vtest.c.

Referenced by main(), and sound_step().


Generated on Fri Sep 28 00:35:47 2007 for raceintospace by  doxygen 1.5.3