#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 |
void busywait | ( | double | secs | ) |
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_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().
int buffer_size [static] |
Definition at line 16 of file vtest.c.
Referenced by set_hwparams(), set_swparams(), and sound_play().
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().
int soundbuf_off |
int soundbuf_playing |
int soundbuf_size |
int soundbuf_used |
int xrun_count |