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!

adrv_set_channels

Audio driver method for setting/getting the number of channels

Usage

unsigned int (*adrv_set_channels) (int dev, unsigned int nch);

Description

The first paramater (dev) is anways the audio engine number which is an index to the audio_engines table. The driver can use the audio_engines entry to find out some of the current parameters. In particular the devc, portc, portc_play and portc_record fields can be used to locate the driver defined structures for the audio engine.

The purpose of this audio driver method is very simple. It sets the number of channels to be used when the adrv_prepare_for_input and adrv_prepare_for_output methods get called to start the device. The change in the number of channels in no case take effect immediately. Instead the driver should store the new format in the portc structure for the engine until the adrv_prepare_for_* method gets called.

Return value

Audio driver entry point should return 0 if the call was successful. Negative return value (-errno) means that an error has occurred. However some of the functions have void type and they don't return any value.

Referenced by

vmix_core/vmix_input.cVirtual mixing audio driver recording routines
vmix_core/vmix_output.cVirtual mixing audio driver output mixing routines
audio/oss_audio_core.cAudio core functionality of OSS
include/ossddk.hSource file oss-current/kernel/framework/include/ossddk/ossddk.h
remux/oss_remux.cMulti channel playback support for devices with multiple stereo engines.


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