]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
write
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Jun 2025 15:39:01 +0000 (17:39 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 10 Jun 2025 14:04:43 +0000 (16:04 +0200)
recv.c
write.c

diff --git a/recv.c b/recv.c
index f5942d36343548dde7d34efe085b2d3f9cb300e1..139e9bac2eda59a0fd58480ece1f8269166c33a4 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -54,15 +54,14 @@ static void handle_help_flag(struct lls_parse_result *lpr)
        exit(EXIT_SUCCESS);
 }
 
-/** \endcond doxygen_ignore
+/** \endcond
  *
- * The main function of para_recv.
+ * The main function of para_recv(1).
  *
- * \param argc Command line options are parsed by the lopsub library.
+ * \param argc Options are defined in the recv lopsub suite.
  *
- * \param argv Options are defined in the lopsub suite file of the source tree
- * (not part of the doxygen system). A separate suite file defines the options
- * of the receivers where each receiver corresponds to a lopsub subcommand.
+ * \param argv The recv_cmd suite file defines the various receivers and their
+ * options. Each receiver corresponds to a lopsub subcommand of this suite.
  *
  * para_recv receives an audio stream and writes received it to stdout.
  * If the afh receiver is specified, the stream is "received" from a local
diff --git a/write.c b/write.c
index 1cdfbc0fd72517a44c4fb9ff18d9cf6c803e6978..e7aacf677619068f1eea5c397cd58d7ef0d3de6b 100644 (file)
--- a/write.c
+++ b/write.c
@@ -1,6 +1,14 @@
 /* Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
-/** \file write.c Paraslash's standalone wav/raw player. */
+/** \file write.c Paraslash's standalone wav/raw player.
+ *
+ * This file contains the main function of para_write(1), which is conceptually
+ * similar to para_recv(1) in that it employs the scheduler and sets up a
+ * simple buffer tree. The tree combines the stdin buffer tree node with
+ * one of the paraslash writers. Besides the writers, the check_wav object
+ * is also linked into the executable.
+ *
+ * \cond doxygen_ignore */
 
 #include <sys/types.h>
 #include <lopsub.h>
@@ -18,7 +26,6 @@
 #include "error.h"
 #include "check_wav.h"
 
-/** Array of error strings. */
 DEFINE_PARA_ERRLIST;
 
 #define CMD_PTR (lls_cmd(0, write_suite))
@@ -124,16 +131,24 @@ static int setup_and_schedule(struct lls_parse_result *lpr)
        return ret;
 }
 
-/**
- * Para_write's main function.
+/** \endcond
+ *
+ * The main function of para_write(1).
+ *
+ * \param argc Options are defined in the write lopsub suite.
  *
- * \param argc The usual argument counter.
- * \param argv The usual argument vector.
+ * \param argv The write_cmd suite file defines the various writers and their
+ * options. Each writer corresponds to a lopsub subcommand of this suite.
  *
- * It sets up and starts the tasks and the buffer tree nodes determined by
- * command line options.
+ * Set up the stdin task, the check_wav task and the writer task, and combine
+ * the corresponding buffer tree nodes to form a chain. The check wav task
+ * becomes active as soon as the first chunk of data is read from stdin. If
+ * the data looks like a wav header, the check_wav task parses the header,
+ * and passes through subsequent data, waiting for the writer task calling
+ * \ref btr_exec_up() to query the number of channels, the sample rate and
+ * the sample format.
  *
- * \return \p EXIT_SUCCESS or EXIT_FAILURE
+ * \return EXIT_SUCCESS or EXIT_FAILURE
  */
 int main(int argc, char *argv[])
 {