]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added examples (test/pcm.c and test/latency.c)
authorJaroslav Kysela <perex@perex.cz>
Thu, 18 Oct 2001 19:35:56 +0000 (19:35 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 18 Oct 2001 19:35:56 +0000 (19:35 +0000)
doc/doxygen.cfg
doc/pcm.doxygen

index f9fc1bfdc8bd7dda551ab782584f4cecd91dea36..1bad25edc47c208784c9a8c2f38ca6ce25fdfe00 100644 (file)
@@ -21,7 +21,7 @@ EXCLUDE                = ../src/control/control_local.h \
                   ../src/seq/seq_local.h
 RECURSIVE       = YES
 FILE_PATTERNS    = *.c *.h
-#EXAMPLE_PATH     = example_test.cpp
+EXAMPLE_PATH     = ../test/pcm.c ../test/latency.c
 QUIET            = YES
 
 EXTRACT_ALL     = NO
index a4cfdc707d8557993bd1c7b0a45e7212e25ea5a2..44ff1641365fc5fec57976eed1bbedea8df091f1 100644 (file)
@@ -197,7 +197,8 @@ returns 24 in the case.
 There are two methods to transfer samples in application. The first method
 is the standard read / write one. The second method, uses the direct audio
 buffer to communicate with the device while ALSA library manages this space
-itself.
+itself. You can find example of all communication schemes for playback
+in \ref example_test_pcm "Sine-wave generator example".
 
 \subsection alsa_pcm_rw Read / Write transfer
 
@@ -222,4 +223,37 @@ to allow the ALSA library update the pointers to ring buffer. This sort of
 communication is also called "zero-copy", because the device does not require
 to copy the samples from application to another place in system memory.
 
+\par
+
+If you like to use the compatibility functions in mmap mode, there are
+read / write routines equaling to standard read / write transfers. Using
+these functions discards the benefits of direct access to memory region.
+See the \link ::snd_pcm_mmap_readi() \endlink,
+\link ::snd_pcm_writei() \endlink, \link ::snd_pcm_readn() \endlink
+and \link ::snd_pcm_writen() \endlink functions.
+
+\section pcm_examples Examples
+
+The full featured examples with cross-links:
+
+\par Sine-wave generator
+\ref example_test_pcm "example code"
+\par
+This example shows various transfer methods for the playback direction.
+
+\par Latency measuring tool
+\ref example_test_latency "example code"
+\par
+This example shows the measuring of minimal latency between capture and
+playback devices.
+
 */
+
+/**
+ * \example ../test/pcm.c
+ * \anchor example_test_pcm
+ */
+/**
+ * \example ../test/latency.c
+ * \anchor example_test_latency
+ */