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.rst20
1 files changed, 12 insertions, 8 deletions
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index ed84413..80551aa 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -38,6 +38,10 @@ the standard audio interface for Linux and recent versions of FreeBSD.
This probably all warrants a footnote or two, but I don't understand
things well enough right now to write it! --GPW
+.. versionchanged:: 3.3
+ Operations in this module now raise :exc:`OSError` where :exc:`IOError`
+ was raised.
+
.. seealso::
@@ -45,7 +49,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
the official documentation for the OSS C API
The module defines a large number of constants supplied by the OSS device
- driver; see ``<sys/soundcard.h>`` on either Linux or FreeBSD for a listing .
+ driver; see ``<sys/soundcard.h>`` on either Linux or FreeBSD for a listing.
:mod:`ossaudiodev` defines the following variables and functions:
@@ -56,7 +60,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
- :c:func:`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`IOError`.
+ :c:func:`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`OSError`.
Errors detected directly by :mod:`ossaudiodev` result in :exc:`OSSAudioError`.)
(For backwards compatibility, the exception class is also available as
@@ -165,11 +169,11 @@ and (read-only) attributes:
be used in a :keyword:`with` statement.
-The following methods each map to exactly one :func:`ioctl` system call. The
+The following methods each map to exactly one :c: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
be useful when consulting the OSS documentation). If the underlying
-:func:`ioctl` fails, they all raise :exc:`IOError`.
+:c:func:`ioctl` fails, they all raise :exc:`OSError`.
.. method:: oss_audio_device.nonblock()
@@ -298,7 +302,7 @@ simple calculations.
fmt = dsp.setfmt(fmt)
channels = dsp.channels(channels)
- rate = dsp.rate(channels)
+ rate = dsp.rate(rate)
.. method:: oss_audio_device.bufsize()
@@ -345,7 +349,7 @@ The mixer object provides two file-like methods:
.. method:: oss_mixer_device.close()
This method closes the open mixer device file. Any further attempts to use the
- mixer after this file is closed will raise an :exc:`IOError`.
+ mixer after this file is closed will raise an :exc:`OSError`.
.. method:: oss_mixer_device.fileno()
@@ -404,7 +408,7 @@ The remaining methods are specific to audio mixing:
returned, but both volumes are the same.
Raises :exc:`OSSAudioError` if an invalid control was is specified, or
- :exc:`IOError` if an unsupported control is specified.
+ :exc:`OSError` if an unsupported control is specified.
.. method:: oss_mixer_device.set(control, (left, right))
@@ -428,7 +432,7 @@ The remaining methods are specific to audio mixing:
.. method:: oss_mixer_device.set_recsrc(bitmask)
Call this function to specify a recording source. Returns a bitmask indicating
- the new recording source (or sources) if successful; raises :exc:`IOError` if an
+ the new recording source (or sources) if successful; raises :exc:`OSError` if an
invalid source was specified. To set the current recording source to the
microphone input::