Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7487c02

Browse files
committed
Small markup and English usage nits.
1 parent bfadac0 commit 7487c02

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

Doc/lib/libwave.tex

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Documentations stolen and LaTeX'ed from comments in file.
22
\section{\module{wave} ---
3-
Read and write .WAV files}
3+
Read and write WAV files}
44

55
\declaremodule{standard}{wave}
66
\sectionauthor{Moshe Zadka}{[email protected]}
@@ -10,7 +10,7 @@ \section{\module{wave} ---
1010
format. It does not support compression/decompression, but it does support
1111
mono/stereo.
1212

13-
The \module{wave} module defines the following function:
13+
The \module{wave} module defines the following function and exception:
1414

1515
\begin{funcdesc}{open}{file, mode}
1616
If \var{file} is a string, open the file by that name, other treat it
@@ -38,11 +38,17 @@ \section{\module{wave} ---
3838

3939
\subsection{Wave_read Objects \label{Wave-read-objects}}
4040

41-
Wave_read objects, as returned by \function{open()} above, have the
41+
Wave_read objects, as returned by \function{open()}, have the
4242
following methods:
4343

44+
\begin{methoddesc}[Wave_read]{close}{}
45+
Close the stream, and make the instance unusable. This is
46+
called automatically on object collection.
47+
\end{methoddesc}
48+
4449
\begin{methoddesc}[Wave_read]{getnchannels}{}
45-
Returns number of audio channels (1 for mone, 2 for stereo).
50+
Returns number of audio channels (\code{1} for mono, \code{2} for
51+
stereo).
4652
\end{methoddesc}
4753

4854
\begin{methoddesc}[Wave_read]{getsampwidth}{}
@@ -68,8 +74,9 @@ \subsection{Wave_read Objects \label{Wave-read-objects}}
6874

6975
\begin{methoddesc}[Wave_read]{getparams}{}
7076
Returns a tuple
71-
\code{(nchannels, sampwidth, framerate, nframes, comptype, compname)},
72-
equivalent to output of the \code{get} methods.
77+
\code{(\var{nchannels}, \var{sampwidth}, \var{framerate},
78+
\var{nframes}, \var{comptype}, \var{compname})}, equivalent to output
79+
of the \method{get*()} methods.
7380
\end{methoddesc}
7481

7582
\begin{methoddesc}[Wave_read]{readframes}{n}
@@ -80,7 +87,7 @@ \subsection{Wave_read Objects \label{Wave-read-objects}}
8087
Rewind the file pointer to the beginning of the audio stream.
8188
\end{methoddesc}
8289

83-
The following two functions are defined for compatibility with the
90+
The following two methods are defined for compatibility with the
8491
\refmodule{aifc} module, and don't do anything interesting.
8592

8693
\begin{methoddesc}[Wave_read]{getmarkers}{}
@@ -102,48 +109,48 @@ \subsection{Wave_read Objects \label{Wave-read-objects}}
102109
Return current file pointer position.
103110
\end{methoddesc}
104111

105-
\begin{methoddesc}[Wave_read]{close}{}
106-
Close the stream, and make the instance unusable. (This is
107-
called automatically on deletion.
108-
\end{methoddesc}
109-
110112

111113
\subsection{Wave_write Objects \label{Wave-write-objects}}
112114

113-
Wave_write objects, as returned by \function{open()} above, have the
115+
Wave_write objects, as returned by \function{open()}, have the
114116
following methods:
115117

118+
\begin{methoddesc}[Wave_write]{close}{}
119+
Make sure \var{nframes} is correct, and close the file.
120+
This method is called upon deletion.
121+
\end{methoddesc}
122+
116123
\begin{methoddesc}[Wave_write]{setnchannels}{n}
117124
Set the number of channels.
118125
\end{methoddesc}
119126

120127
\begin{methoddesc}[Wave_write]{setsampwidth}{n}
121-
Set the sample width (in bytes.)
128+
Set the sample width to \var{n} bytes.
122129
\end{methoddesc}
123130

124131
\begin{methoddesc}[Wave_write]{setframerate}{n}
125-
Set the frame rate.
132+
Set the frame rate to \var{n}.
126133
\end{methoddesc}
127134

128135
\begin{methoddesc}[Wave_write]{setnframes}{n}
129-
Set the number of frames. This can be later changed, when and if more
130-
frames are written.
136+
Set the number of frames to \var{n}. This will be changed later if
137+
more frames are written.
131138
\end{methoddesc}
132139

133140
\begin{methoddesc}[Wave_write]{setcomptype}{type, name}
134141
Set the compression type and description.
135142
\end{methoddesc}
136143

137144
\begin{methoddesc}[Wave_write]{setparams}{tuple}
138-
The \var{tuple} should be
139-
\code{(\var{nchannels}, \var{sampwidth}, \var{framerate},
140-
\var{nframes}, \var{comptype}, \var{compname})}, with values valid for
141-
the \code{set} methods. Set all parameters.
145+
The \var{tuple} should be \code{(\var{nchannels}, \var{sampwidth},
146+
\var{framerate}, \var{nframes}, \var{comptype}, \var{compname})}, with
147+
values valid for the \method{set*()} methods. Sets all parameters.
142148
\end{methoddesc}
143149

144150
\begin{methoddesc}[Wave_write]{tell}{}
145151
Return current position in the file, with the same disclaimer for
146-
the \method{Wave_read.tell} and \method{Wave_read.setpos} methods.
152+
the \method{Wave_read.tell()} and \method{Wave_read.setpos()}
153+
methods.
147154
\end{methoddesc}
148155

149156
\begin{methoddesc}[Wave_write]{writeframesraw}{data}
@@ -154,12 +161,6 @@ \subsection{Wave_write Objects \label{Wave-write-objects}}
154161
Write audio frames and make sure \var{nframes} is correct.
155162
\end{methoddesc}
156163

157-
\begin{methoddesc}[Wave_write]{close}{}
158-
Make sure \var{nframes} is correct, and close the file.
159-
160-
This method is called upon deletion.
161-
\end{methoddesc}
162-
163164
Note that it is invalid to set any parameters after calling
164165
\method{writeframes()} or \method{writeframesraw()}, and any attempt
165-
to do so will raise an error.
166+
to do so will raise \exception{wave.Error}.

0 commit comments

Comments
 (0)