summaryrefslogtreecommitdiffstats
path: root/Doc/library/ossaudiodev.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/ossaudiodev.rst')
-rw-r--r--Doc/library/ossaudiodev.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index 3972f14..3b5a7e4 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -1,4 +1,3 @@
-
:mod:`ossaudiodev` --- Access to OSS-compatible audio devices
=============================================================
@@ -57,7 +56,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
what went wrong.
(If :mod:`ossaudiodev` receives an error from a system call such as
- :cfunc:`open`, :cfunc:`write`, or :cfunc:`ioctl`, it raises :exc:`IOError`.
+ :c:func:`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`IOError`.
Errors detected directly by :mod:`ossaudiodev` result in :exc:`OSSAudioError`.)
(For backwards compatibility, the exception class is also available as
@@ -160,6 +159,11 @@ and (read-only) attributes:
is only useful in non-blocking mode. Has no return value, since the amount of
data written is always equal to the amount of data supplied.
+.. versionchanged:: 3.2
+ Audio device objects also support the context manager protocol, i.e. they can
+ be used in a :keyword:`with` statement.
+
+
The following methods each map to exactly one :func:`ioctl` system call. The
correspondence is obvious: for example, :meth:`setfmt` corresponds to the
``SNDCTL_DSP_SETFMT`` ioctl, and :meth:`sync` to ``SNDCTL_DSP_SYNC`` (this can
@@ -347,6 +351,10 @@ The mixer object provides two file-like methods:
Returns the file handle number of the open mixer device file.
+.. versionchanged:: 3.2
+ Mixer objects also support the context manager protocol.
+
+
The remaining methods are specific to audio mixing: