Skip to content

Commit 182a397

Browse files
[3.13] GH-145450: Document missing wave.Wave_write getter methods (GH-145451) (GH-145467)
(cherry picked from commit db41717) Co-authored-by: Michiel W. Beijen <mb@x14.nl>
1 parent 5c77c7d commit 182a397

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

Doc/library/wave.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,21 @@ Wave_write Objects
199199
Set the number of channels.
200200

201201

202+
.. method:: getnchannels()
203+
204+
Return the number of channels.
205+
206+
202207
.. method:: setsampwidth(n)
203208

204209
Set the sample width to *n* bytes.
205210

206211

212+
.. method:: getsampwidth()
213+
214+
Return the sample width in bytes.
215+
216+
207217
.. method:: setframerate(n)
208218

209219
Set the frame rate to *n*.
@@ -213,26 +223,53 @@ Wave_write Objects
213223
integer.
214224

215225

226+
.. method:: getframerate()
227+
228+
Return the frame rate.
229+
230+
216231
.. method:: setnframes(n)
217232

218233
Set the number of frames to *n*. This will be changed later if the number
219234
of frames actually written is different (this update attempt will
220235
raise an error if the output stream is not seekable).
221236

222237

238+
.. method:: getnframes()
239+
240+
Return the number of audio frames written so far.
241+
242+
223243
.. method:: setcomptype(type, name)
224244

225245
Set the compression type and description. At the moment, only compression type
226246
``NONE`` is supported, meaning no compression.
227247

228248

249+
.. method:: getcomptype()
250+
251+
Return the compression type (``'NONE'``).
252+
253+
254+
.. method:: getcompname()
255+
256+
Return the human-readable compression type name.
257+
258+
229259
.. method:: setparams(tuple)
230260

231261
The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype,
232262
compname)``, with values valid for the ``set*()`` methods. Sets all
233263
parameters.
234264

235265

266+
.. method:: getparams()
267+
268+
Return a :func:`~collections.namedtuple`
269+
``(nchannels, sampwidth, framerate, nframes, comptype, compname)``
270+
containing the current output parameters.
271+
272+
236273
.. method:: tell()
237274

238275
Return current position in the file, with the same disclaimer for the
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Document missing public :class:`wave.Wave_write` getter methods.

0 commit comments

Comments
 (0)