]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - alsa_writer.c
split afs.h
[paraslash.git] / alsa_writer.c
index 039c9817a99f13caa5980247e1d481615755680b..5aa908518b113305372d126ead651ec961243046 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;
 };
 
 /*
@@ -126,6 +128,8 @@ static int alsa_open(struct writer_node *w)
                return -E_SW_PARAMS;
        pad->bytes_per_frame = snd_pcm_format_physical_width(FORMAT)
                * conf.channels_arg / 8;
+//     if (snd_pcm_nonblock(pad->handle, 1))
+//             PARA_ERROR_LOG("%s\n", "failed to set nonblock mode");
        return period_size * pad->bytes_per_frame;
 }
 
@@ -172,6 +176,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;