Google
 

Open Sound System
The Hitchhiker's Guide to OSS 4.1 Internals

Do you have problems with sound/audio application development? Don't panic! Click here for help!

oss_audio_open_devfile

Open an audio device file

Usage

int oss_audio_open_devfile(
int dev,
int dev_class,
struct fileinfo *file,
int recursive,
int open_flags,
int *newdev
);

Description

This function is used to open an audio device file (in /dev/oss/). It is usually called directly by the OS dependent device file interface code. Certain virtual/pseudo drivers can also use this function (this possibility is not documented and reserved for use by 4Front Technologies.

This function will call oss_audio_open_engine to open the first audio engine linked to this device file. If the first engine is busy then subsequent engines will be tried (next_in and next_out fields of the adev_t structure) until an available device is found.

Parameters

.
ParameterDescription
dev Audio device file number to be opened.
dev_class OSS device class number (don't care).
file Pointer to OSS file information structure.
recursive Reserved.
open_flags See the description of the open_flags field of adev_t
newdev Minor device number of the opened audio engine will be returned in the variable pointed by this parameter.

Return value

Negative value means error. Otherwise the audio engine index of the opened device will be returned.

Referenced by

audio/oss_audio_core.cAudio core functionality of OSS
include/audio_core.hInternal definitions for the OS audio core
oss_sadasupport/sadasupport_sol9.hSolaris 9 compatible version of sadasupport_open/close


Copyright (C) 4Front Technologies, 2007. All rights reserved.
Back to index OSS web site