| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -181,11 +181,21 @@ Wave_write Objects | |||
| 181 | 181 | Set the number of channels. | |
| 182 | 182 | ||
| 183 | 183 | ||
| 184 | + .. method:: getnchannels() | ||
| 185 | + | ||
| 186 | + Return the number of channels. | ||
| 187 | + | ||
| 188 | + | ||
| 184 | 189 | .. method:: setsampwidth(n) | |
| 185 | 190 | ||
| 186 | 191 | Set the sample width to *n* bytes. | |
| 187 | 192 | ||
| 188 | 193 | ||
| 194 | + .. method:: getsampwidth() | ||
| 195 | + | ||
| 196 | + Return the sample width in bytes. | ||
| 197 | + | ||
| 198 | + | ||
| 189 | 199 | .. method:: setframerate(n) | |
| 190 | 200 | ||
| 191 | 201 | Set the frame rate to *n*. | |
@@ -195,26 +205,53 @@ Wave_write Objects | |||
| 195 | 205 | integer. | |
| 196 | 206 | ||
| 197 | 207 | ||
| 208 | + .. method:: getframerate() | ||
| 209 | + | ||
| 210 | + Return the frame rate. | ||
| 211 | + | ||
| 212 | + | ||
| 198 | 213 | .. method:: setnframes(n) | |
| 199 | 214 | ||
| 200 | 215 | Set the number of frames to *n*. This will be changed later if the number | |
| 201 | 216 | of frames actually written is different (this update attempt will | |
| 202 | 217 | raise an error if the output stream is not seekable). | |
| 203 | 218 | ||
| 204 | 219 | ||
| 220 | + .. method:: getnframes() | ||
| 221 | + | ||
| 222 | + Return the number of audio frames written so far. | ||
| 223 | + | ||
| 224 | + | ||
| 205 | 225 | .. method:: setcomptype(type, name) | |
| 206 | 226 | ||
| 207 | 227 | Set the compression type and description. At the moment, only compression type | |
| 208 | 228 | ``NONE`` is supported, meaning no compression. | |
| 209 | 229 | ||
| 210 | 230 | ||
| 231 | + .. method:: getcomptype() | ||
| 232 | + | ||
| 233 | + Return the compression type (``'NONE'``). | ||
| 234 | + | ||
| 235 | + | ||
| 236 | + .. method:: getcompname() | ||
| 237 | + | ||
| 238 | + Return the human-readable compression type name. | ||
| 239 | + | ||
| 240 | + | ||
| 211 | 241 | .. method:: setparams(tuple) | |
| 212 | 242 | ||
| 213 | 243 | The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, | |
| 214 | 244 | compname)``, with values valid for the ``set*()`` methods. Sets all | |
| 215 | 245 | parameters. | |
| 216 | 246 | ||
| 217 | 247 | ||
| 248 | + .. method:: getparams() | ||
| 249 | + | ||
| 250 | + Return a :func:`~collections.namedtuple` | ||
| 251 | + ``(nchannels, sampwidth, framerate, nframes, comptype, compname)`` | ||
| 252 | + containing the current output parameters. | ||
| 253 | + | ||
| 254 | + | ||
| 218 | 255 | .. method:: tell() | |
| 219 | 256 | ||
| 220 | 257 | Return current position in the file, with the same disclaimer for the | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Document missing public :class:`wave.Wave_write` getter methods. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments