Movatterモバイル変換


[0]ホーム

URL:


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:21. SunOS Specific ServicesUp:21. SunOS Specific ServicesNext:21.1.1 Audio Device Objects

21.1sunaudiodev -- Access to Sun audio hardware

Availability:SunOS.

This module allows you to access the Sun audio interface. The Sunaudio hardware is capable of recording and playing back audio datain u-LAW format with a sample rate of 8K per second. Afull description can be found in theaudio(7I) manual page.

The moduleSUNAUDIODEV defines constants which may be used with this module.

This module defines the following variables and functions:

exceptionerror
This exception is raised on all errors. The argument is a stringdescribing what went wrong.

open(mode)
This function opens the audio device and returns a Sun audio deviceobject. This object can then be used to do I/O on. Themode parameteris one of'r' for record-only access,'w' for play-onlyaccess,'rw' for both and'control' for access to thecontrol device. Since only one process is allowed to have the recorderor player open at the same time it is a good idea to open the deviceonly for the activity needed. Seeaudio(7I) for details.

As per the manpage, this module first looks in the environmentvariableAUDIODEV for the base audio device filename. If notfound, it falls back to/dev/audio. The control device iscalculated by appending ``ctl'' to the base audio device.


Subsections


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:21. SunOS Specific ServicesUp:21. SunOS Specific ServicesNext:21.1.1 Audio Device Objects
Release 2.2.3, documentation updated on 30 May 2003.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2026 Movatter.jp