4 #include "adeviceprefs.inc"
6 #include "audiodevice.h"
9 #include <alsa/asoundlib.h>
11 class AudioALSA
: public AudioLowLevel
14 AudioALSA(AudioDevice
*device
);
17 static void list_devices(ArrayList
<char*> *devices
, int pcm_title
= 0, int mode
= MODEPLAY
);
21 int write_buffer(char *buffer
, int size
);
22 int read_buffer(char *buffer
, int size
);
25 int64_t device_position();
27 int interrupt_playback();
31 void translate_name(char *output
, char *input
);
32 snd_pcm_format_t
translate_format(int format
);
33 void set_params(snd_pcm_t
*dsp
,
38 int create_format(snd_pcm_format_t
*format
, int bits
, int channels
, int rate
);
39 snd_pcm_t
* get_output();
40 snd_pcm_t
* get_input();
41 snd_pcm_t
*dsp_in
, *dsp_out
, *dsp_duplex
;
42 int64_t samples_written
;