summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Doc/lib/libsndhdr.tex
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/lib/libsndhdr.tex
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/lib/libsndhdr.tex')
-rw-r--r--sys/src/cmd/python/Doc/lib/libsndhdr.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/lib/libsndhdr.tex b/sys/src/cmd/python/Doc/lib/libsndhdr.tex
new file mode 100644
index 000000000..a7f8c6eaa
--- /dev/null
+++ b/sys/src/cmd/python/Doc/lib/libsndhdr.tex
@@ -0,0 +1,41 @@
+\section{\module{sndhdr} ---
+ Determine type of sound file}
+
+\declaremodule{standard}{sndhdr}
+\modulesynopsis{Determine type of a sound file.}
+\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
+% Based on comments in the module source file.
+
+
+The \module{sndhdr} provides utility functions which attempt to
+determine the type of sound data which is in a file. When these
+functions are able to determine what type of sound data is stored in a
+file, they return a tuple \code{(\var{type}, \var{sampling_rate},
+\var{channels}, \var{frames}, \var{bits_per_sample})}. The value for
+\var{type} indicates the data type and will be one of the strings
+\code{'aifc'}, \code{'aiff'}, \code{'au'}, \code{'hcom'},
+\code{'sndr'}, \code{'sndt'}, \code{'voc'}, \code{'wav'},
+\code{'8svx'}, \code{'sb'}, \code{'ub'}, or \code{'ul'}. The
+\var{sampling_rate} will be either the actual value or \code{0} if
+unknown or difficult to decode. Similarly, \var{channels} will be
+either the number of channels or \code{0} if it cannot be determined
+or if the value is difficult to decode. The value for \var{frames}
+will be either the number of frames or \code{-1}. The last item in
+the tuple, \var{bits_per_sample}, will either be the sample size in
+bits or \code{'A'} for A-LAW\index{A-LAW} or \code{'U'} for
+u-LAW\index{u-LAW}.
+
+
+\begin{funcdesc}{what}{filename}
+ Determines the type of sound data stored in the file \var{filename}
+ using \function{whathdr()}. If it succeeds, returns a tuple as
+ described above, otherwise \code{None} is returned.
+\end{funcdesc}
+
+
+\begin{funcdesc}{whathdr}{filename}
+ Determines the type of sound data stored in a file based on the file
+ header. The name of the file is given by \var{filename}. This
+ function returns a tuple as described above on success, or
+ \code{None}.
+\end{funcdesc}