* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
+/** \file alsa_writer.c paraslash's alsa output plugin */
+
/*
* Based in parts on aplay.c from the alsa-utils-1.0.8 package,
* Copyright (c) by Jaroslav Kysela <perex@suse.cz>, which is
extern struct gengetopt_args_info conf;
#define FORMAT SND_PCM_FORMAT_S16_LE
+
+/** data specific to the alsa writer */
struct private_alsa_data {
- snd_pcm_t *handle;
- size_t bytes_per_frame;
+/** the alsa handle */
+snd_pcm_t *handle;
+/** determined and set by alsa_open() */
+size_t bytes_per_frame;
};
/*
{
struct private_alsa_data *pad = wn->private_data;
size_t frames = nbytes / pad->bytes_per_frame;
- unsigned char *d = data;
+ unsigned char *d = (unsigned char*)data;
snd_pcm_sframes_t r, result = 0;
while (frames > 0) {
free(pad);
}
+/** the init function of the alsa writer */
void alsa_writer_init(struct writer *w)
{
w->open = alsa_open;