[Previous] [Contents] [Next]

Audio

Audio device manager (QNX)

Syntax:

Audio [options] [driver [driver_options]]...

Options:

-A
Use auto-initialize DMA.
-D
Debug mode.
-F
Run with priority inheritance
driver [driver_options]...
Specify the driver to use and the driver options to match the hardware configuration being used. Available drivers include:
driver Hardware Default options
sb Soundblaster -b220 -d1 -i7
pas ProAudio Spectrum -b388 -d1 -i7
mss Microsoft Sound System -b530 -d1 -i7
mpu Roland MPU-401 -b330 -i2
adlib Adlib -b388
Consult the usage message (use Audio) or the hardware support technical notes on QUICS for recent additions to the list of supported audio hardware types.

driver_options may be specified to override the defaults listed in the table above. Available options are:

-b port
Specify base I/O port.
-d dma1[,dma2]
Specify DMA channel(s), if applicable.
-i irq
Specify IRQ, if applicable.

Description:

The Audio manager handles playing and recording sounds on common audio hardware through the device /dev/dsp. Recording is done by reading from /dev/dsp and playback is done by writing to /dev/dsp. Recording and playback parameters may be adjusted via C programs through ioctl() calls. Some of the most commonly adjusted parameters include volume level, sample rates and sample resolution.

A technical note on audio programming can be found in the /etc/readme/technotes/ directory which documents the available ioctl() calls, and demo source code is shipped with the operating system under the /usr/demo/src/audio directory.

Examples:

Start Audio using a Soundblaster card and default options:

    Audio sb &

Start Audio using a Soundblaster card in the default configuration. Record a test audio sample into mysounds and play it back:

    Audio sb &
    cat /dev/dsp >mysounds

Stop the sampling operation by typing Ctrl-C.

Now play it back:

    cat mysounds >/dev/dsp

Files:

Audio closes its standard input, standard output and standard error after initialization has been completed. Error messages during initialization will be written to standard error.

Audio adopts the character special file /dev/dsp with which applications may perform I/O in order to playback and record sound data.

Exit status:

Audio normally will not terminate. However, it is possible for it to exit if it encounters errors on startup, or if it has not been started in the background (in which case it will fork itself and the foreground copy will exit with an exit status of 0).

0
Not run in foreground; successfully forked a background copy.
>0
Failed to start successfully. A message stating the reason for the failure will be written to standard error before Audio exits.

See also:

/etc/readme/technotes/Audio.doc, /usr/demo/src/audio/vplay, /usr/demo/src/audio/vplay.c, /usr/include/sys/audio.h


[Previous] [Contents] [Next]