]> git.sesse.net Git - pitch/blob - linux_audio.h
Make the ALSA reader handle and recover from underruns.
[pitch] / linux_audio.h
1 #ifndef _LINUX_AUDIO_H
2 #define _LINUX_AUDIO_H 1
3
4 #include <alsa/asoundlib.h>
5
6 snd_pcm_t *get_dsp_handle(int sample_rate);
7 void read_chunk(snd_pcm_t *handle, short *in, unsigned num_samples);
8 void write_sine(int dsp_fd, double freq, unsigned num_samples, unsigned sample_rate);
9
10 #endif /* !defined(_LINUX_AUDIO_H) */