mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
SF #818006: merge from release24-maint branch: add useful read-only
attributes to oss_audio_device object: 'closed', 'name', and 'mode'.
This commit is contained in:
parent
78be7df9e4
commit
50682d0f78
4 changed files with 101 additions and 35 deletions
|
@ -115,7 +115,7 @@ three audio parameters at once. This is more convenient, but may not be
|
|||
as flexible in all cases.
|
||||
|
||||
The audio device objects returned by \function{open()} define the
|
||||
following methods:
|
||||
following methods and (read-only) attributes:
|
||||
|
||||
\begin{methoddesc}[audio device]{close}{}
|
||||
Explicitly close the audio device. When you are done writing to or
|
||||
|
@ -289,6 +289,21 @@ Returns the number of samples that could be queued into the hardware
|
|||
buffer to be played without blocking.
|
||||
\end{methoddesc}
|
||||
|
||||
Audio device objects also support several read-only attributes:
|
||||
|
||||
\begin{memberdesc}[audio device]{closed}{}
|
||||
Boolean indicating whether the device has been closed.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[audio device]{name}{}
|
||||
String containing the name of the device file.
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[audio device]{mode}{}
|
||||
The I/O mode for the file, either \code{"r"}, \code{"rw"}, or \code{"w"}.
|
||||
\end{memberdesc}
|
||||
|
||||
|
||||
\subsection{Mixer Device Objects \label{mixer-device-objects}}
|
||||
|
||||
The mixer object provides two file-like methods:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue