aac: error cleanup
[paraslash.git] / alsa_writer.c
index 53cf7e369b585c079c1f0beeed71582498d4e1d4..601353aaac84b7a8969d4bf9b5dc01d68242de19 100644 (file)
@@ -40,8 +40,10 @@ extern struct gengetopt_args_info conf;
 
 /** 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;
 };
 
 /*
@@ -140,7 +142,7 @@ static int alsa_write(char *data, size_t nbytes, struct writer_node *wn)
 {
        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) {
@@ -172,6 +174,7 @@ static void alsa_close(struct writer_node *wn)
        free(pad);
 }
 
+/** the init function of the alsa writer */
 void alsa_writer_init(struct writer *w)
 {
        w->open = alsa_open;