]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Para_play: Improve doxygen global description.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 5 Oct 2022 19:31:03 +0000 (21:31 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 12 Feb 2023 22:45:21 +0000 (23:45 +0100)
Expand and reword this text a bit, and move it into the documentation
of main() so that it appears in the generated html.

play.c

diff --git a/play.c b/play.c
index 262f69ee4dc3d57686904fafb5597e1d955a189d..055293a905807a7641e382de7e7ff6cd9f8f15a7 100644 (file)
--- a/play.c
+++ b/play.c
 #include "write.h"
 #include "fd.h"
 
-/**
- * Besides playback tasks which correspond to the receiver/filter/writer nodes,
- * para_play creates two further tasks: The play task and the i9e task. It is
- * important whether a function can be called in the context of para_play or
- * i9e or both. As a rule, all command handlers are called only in i9e context via
- * the line handler (input mode) or the key handler (command mode) below.
- *
- * Playlist handling is done exclusively in play context.
- */
-
 /** Array of error strings. */
 DEFINE_PARA_ERRLIST;
 
@@ -1246,10 +1236,25 @@ out:
 /**
  * The main function of para_play.
  *
- * \param argc Standard.
- * \param argv Standard.
+ * \param argc See man page.
+ * \param argv See man page.
+ *
+ * para_play distributes its work by submitting various tasks to the paraslash
+ * scheduler. The receiver, filter and writer tasks, which are used to play an
+ * audio file, require one task each to maintain their underlying buffer tree
+ * node. These tasks only exist when an audio file is playing.
+ *
+ * The i9 task, which is submitted and maintained by the i9e subsystem, reads
+ * an input line and calls the corresponding command handler such as com_stop()
+ * which is implemented in this file. The command handlers typically write a
+ * request to the global play_task structure, whose contents are read and acted
+ * upon by another task, the play task.
+ *
+ * As a rule, playlist handling is performed exclusively in play context, i.e.
+ * in the post-monitor step of the play task, while command handlers are only
+ * called in i9e context.
  *
- * \return \p EXIT_FAILURE or \p EXIT_SUCCESS.
+ * \return EXIT_FAILURE or EXIT_SUCCESS.
  */
 int main(int argc, char *argv[])
 {