Open Sound System
OSS 4.x Programmer's Guide

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

PCM_CAP_VIRTUAL audio device capability

The device is virtual (doesn't control hardware directly)


In addition to the "real" hardware devices OSS supports also virtual devices such as the Virtual Mixer and IMIX drivers. Such devices may or may not be connected to some real devices.

Checking for this capability may be usefull in some utilities. However ordinary applications should not care about of it.

Virtual devices usually have longer latencies than the real devices but the difference is usually not significant. Also virtual devices may cause problems with applications that are buggy. There will not be any problems with applications that use documented OSS features in the documented way. Applications should avoid workarounds based on the PCM_CAP_VIRTUAL capability. They are likely to cause problems in some other environments. It's better to fix the actual bugs.

Applications must not refuse to work with virtual devices for any reason. The user has made a decision to use the application with a virtual device. He/she takes the responsibility of possible latency or other problems. If the application does this decicion automatically the user cannot even check if it works.

In some cases it may be possible that the application prints a warning if it's author knoes that virtual devices will not work.

Audio device capabilities like PCM_CAP_VIRTUAL can be checked using the SNDCTL_AUDIOINFO or SNDCTL_DSP_GETCAPS ioctl calls.

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