Control Panel application

Virtual Audio Cable

Control Panel application

VAC Control Panel is a standalone application that allows to view cable operating modes and to configure their parameters. All configurable VAC parameters can be set with the VAC Control Panel.

Don't confuse VAC Control Panel with the Windows Control Panel, they are independent at all.

You can start VAC Control Panel from the Start menu, by opening the program folder where you have installed VAC.

VAC Control Panel shows all available Virtual Cables and their parameters/statuses, together with global driver parameters and status.

Driver parameter section

This section combines global driver parameters not specific to a particular cable.

  • Cables - number of cables created by the driver. Has its own Set button. Changing this value causes driver restart.

  • The Worker threads group controls driver worker thread usage policy. Has its own Set button. Number of cables cannot be changed while at least one cable is in use.

    Up to - maximum number of worker threads running by VAC driver. In Auto mode, one working thread per physical CPU/core is created (a single thread on a single-core CPU, two threads on a dual-core CPU or a two-CPU board, and so on). You may need to limit number of worker threads if you create many (several dozens of) streams and want to lower CPU load but don't need to minimize latency as possible. In such case, you can limit number of worker threads by n-1 or n-2 (n is a number of physical CPUs/cores) to free 1-2 CPUs/cores for other tasks. In hyper-threading systems, you can set number of worker threads larger than a number of physical CPUs/cores, up to a number of logical CPUs. Some systems can work more efficiently in such case but please make sure that your system really can. Otherwise, you may lower the performance instead of raising it.

    Prio - worker threads scheduling priority. In Auto mode, they have a priority between a normal thread priority in the system (15) and a maximum possible priority (31). The higher is the priority, the more aggressive VAC uses CPU resources, preempting other user and system threads carrying out other tasks. Use priority value 31 with an extreme care: if the interrupt interval is very low (1-2 ms), number of worker threads is not limited and several threads intensively communicate with VAC driver using short (several milliseconds) data buffers, it may produce very high load on all available CPUs/cores and even freeze your system totally.

  • Clients - global driver client counter. Counts all driver clients, not only audio stream owners. Each time as the driver interface is accessed (opened) by the system and/or an application, a new client arrival is registered. Some applications and/or system components may hold driver interface instances without stream creation; you could see client counter change as they start or exit.

  • Streams - global audio stream counter. Counts all audio streams associated with all cables.

  • Restart - driver restart button. Restarts the driver, causing the driver to terminate, unload, reload and reinitialize. See this for details.

  • Reset counters - reset overflow/underflow counters for all cables.

  • Restart Audio Engine - a button to restart System Audio Engine.

Cable parameter section

This section combines individual cable parameters.

  • Format range (SR, BPS, NC) - sampling rate, bits per sample and number of channels ranges for the cable format range.

  • Connected source lines - currently connected source lines. Checked source lines are exposed lines are reported as "connected" (plugged in). Connected lines must be a subset of the "Source line types mask" configuration parameter.

  • Max inst - maximum number of pin instances (number of times the pin can be instantiated). A first pin instance is always reserved for System Audio Engine. Other instances are available for client applications. A driver that provides more than one pin instance is considered "hardware-accelerated" and can be used in extended DirectSound or Exclusive Mode WASAPI playback. See the DirectSound issues chapter for details. Changing this value causes driver restart.

  • Ms per int - a number of milliseconds per software timer events (interrupts). 20 ms per interrupt means 50 interrupts per second, 10 ms per interrupt means 100 interrupts per second, and so on. It represents a frequency with which audio data portions are transferred from playback cable side to its recording side (many applications use the "latency time" term). The more events per second, the less latency time, the more system overhead. Typical audio cards use 5-15 milliseconds per interrupt; DirectSound subsystem uses 10 ms as a default.

  • Stream fmt limit - stream format limiting mode.

  • Volume control - state of the cable volume control mode. Enable to allow to change cable and stream volume levels.

  • Clock corr ratio - clock correction ratio value, in percents. If the value is 100%, cable clock rate exactly matches a sampling rate value of the cable format. If the correction value is more than 100%, cable clock goes faster, otherwise it goes slower. For example, if the value is 100.25, cable clock goes 0.25% faster; if the value is 99.98, cable clock goes 0.02% slower. Clock correction precision is 0.0000001%.

    You can change clock correction value even if a cable is active (has streams), changes will be reflected immediately.

  • Enable channel mixing - controls channel mixing mode. Leave enabled to use standard channel conversion, disable to use channel scatter/gather mode.

  • Use PortCls - controls PortCls engine usage. Enable to use a standard and reliable but non-optimal stream data interchange engine.

  • Enable spk pin - set "Speakers" type for playback end filter pin. Changing this value causes driver restart. Please note that all cables with this option enabled will have the same playback endpoint name.

  • Stream buffer - controls stream internal data buffer length. "Auto" means a minimal possible value chosen by a driver.

  • Stream buffer watermark control - groups stream buffer watermark control parameters. See here for details.

    Enabled - controls watermark control mode. If enabled, buffer watermark values are used. Otherwise, buffer processing is performed as usual.

    Low - low watermark value in milliseconds. When the amount of buffered stream data (measured in duration of recording/playback) becomes less than a specified value, VAC delays stream data processing until the client provides enough amount of data/storage.

    High - high watermark value in milliseconds. When stream buffer processing is temporarily delayed because of reaching low watermark limit, the client should provide at least the specified amount of data/storage to resume data processing.

    Max wait - maximum high watermark waiting time in milliseconds. This is a guard time to avoid infinite delays in stream data processing. If stream data processing is delayed but the client does not provide data/storage within the specified time, buffer processing is resumed anyway.

  • Set - a button to apply specified parameter values to all selected cables. Most cable parameters cannot be changed if the cable is in use (has clients).

  • Reset counters - a button to reset overflow/underflow counters for selected cables.

Cable list section

This section shows all available cables and their most important parameters/states.

  • Cable - cable number, starting from 1. These numbers are the same as recording/playback device numbers like "Virtual Cable N" or "Line N (Virtual Audio Cable)".

  • Ms per int - number of milliseconds between timer events (interrupts).

  • SR/BPS/NC ranges - format range.

  • Stream fmt limit - stream format limiting mode.

  • Volume control - state of the cable volume control mode.

  • Chan mix - channel mixing mode.

  • PortCls - PortCls engine usage mode.

  • Wmk control - stream buffer watermark control mode.

  • Current format - current cable format, represented by a single sting: Type/SR/BPS/NC(CM), where:

    Type - format type: PCM - old PCM (WAVEFORMATEX), ExtPCM - modern extensible PCM (WAVEFORMATEXTENSIBLE).

    SR - current sampling rate.

    BPS - current number of bits per sample. If sample container size is greater than required to store actual number of bits per sample (for example, 4 bytes for 22 bits), container size in bytes is shown in parentheses after number of bits.

    NC - current number of channels.

    CM - channel configuration mask (hexadecimal).

    For example:

    • 48000/16/2(3) - 48000 samples per second, 16 bits per sample (in two-byte container), two channels (standard stereo);

    • 96000/24(4)/6(3f) - 96000 samples per second, 24 bits per sample (in four-byte container), six channels (old speaker configuration with two back speakers);

    • 96000/24/6(60f) - 96000 samples per second, 24 bits per sample (in three-byte container), six channels (new speaker configuration with two side speakers).

  • Rc stms, Pb stms - number of recording (capture) and playback (render) streams.

  • Signal - peak signal level (amplitude) indicators. Are shown in a standard channel sequence (FL-FR-FC-LF-BL-BR-FLC-FRC-BC-SL-SR). To have a larger view, use Windows Magnifier Tool (Accessories - Ease of Access).

  • Oflows, Uflows - number of data overflows/underflows.

Cable list is updated twice per second, showing actual cable states.

Please note that even if cables are visible in VAC Control Panel, they may be inaccessible for audio applications in remote sessions.

If current cable format parameters (sampling rate, bits per sample and number of channel) are shown for a particular cable, it means the cable is in use (has clients). Also, number of playback and recording streams (pin instances) are shown.

The number of playback/recording streams means how many input/output pin instances are created. Usually it is equal to a number of input/output clients but first rendering pin instance is internally used by System Audio Engine (see audio layering issues section). Additionally, an single application can create multiple pin instances.

Since Windows audio subsystem reserves a first pin instance for System Audio Engine, you may see some Virtual Cable is still in use within several seconds after playback is stopped. It is because audio subsystem keeps a mixing thread running several seconds after all other pin instances are closed.

Current cable format can help if you don't know which audio format is used by a particular application or are not sure is cable port really open or not.

The OFlows ans UFlows columns show cable data overflow/underflow counters. An overflow is registered if a recording client does not provide free data storage (a buffer) within an appropriate time, and some audio data to be recorded are lost (there is a drop-out). An underflow is registered if a playback client does not provide filled data storage (a buffer) within an appropriate time, and some audio data to be played back are late (there is a gap).

Overflows/underflows are registered for a cable client but counted for entire cable. If a cable has several clients while some of them behave well and provide their buffers fast enough but some others fail to provide buffers fast enough, recording client overflows affect only their own data but playback client underflows affect entire cable and data of all recording clients. If a playback client experience underflows, the cable will not receive a solid data stream from this client and resulting mixed cable stream will be incomplete. On the contrary, recording clients receive a mixed cable stream so if a client experience overflows, only its own data will be incomplete.

If overflows/underflows occur only at stream start/stop, you can ignore them. It happens, for example, if an application first starts a rendering/playback stream then begins to provide data buffers and/or first stops to provide data buffers then stops a stream. Such behavior is not desirable but it is not an error.

If the cable is accessed in shared mode, there may be some issues with overflow/underflow counters. System Audio Engine does not pause its shared stream when all client streams are paused. Instead, it simply stops providing memory buffers to the driver (VAC) if there are no running client streams.

For example, if you run an audio player, start playback to a high-level audio port (endpoint) provided by System Audio Engine from VAC's low-level port (pin) while there are no other playback streams in the system, System Audio Engine becomes VAC driver client, creating a playback stream, and begins providing audio data buffers. If you pause the player, System Audio Engine does not pause its pin instance provided by VAC, it just stop providing data buffers. Since VAC does not know why its client does not provide data buffers, it registers buffer overflows and increments the counter continuously. If such situation occurs with audio recording, underflow counter is continuously incremented.

Please don't confuse cable's overflows/underflows with Audio Repeater's overflows/underflows.

Changing driver/cable parameters

To change parameter values for a single cable, select particular cable row in the list, change values in selection/edit fields, and click Set button. Make sure that the selected cable is not used (the format parameter in the list is blank).

To change parameter values for multiple cables, hold Ctrl key while selecting individual rows or hold Shift key to select several adjacent rows. In multi-selection mode, a field filled with a value or a cleared/checked box mean that the parameter value is equal for all selected cables. An empty field or a greyed box mean that this parameter values are different for some cables. If you leave (or make) some fields empty and/or some boxes greyed before clicking Set, these parameters will not be affected.

To change number of cables, select appropriate value in the Number of cables field and click Set button next to this field. Before changing number of cables, it is strongly recommended to close all audio applications. Also, many audio applications query a list of available devices only on startup and they would not work properly until restarted.

Please note that changing number of cables require driver restart.

System limitations and overhead

Windows 2000 limits number of MME devices to 8 while Windows XP/2003 increase this limit to 32. So MME applications that use waveIn/waveOut functions won't see more than 32 cables in Windows XP/2003 and more than 8 in Windows 2000. To use more cables you need either to use DirectSound or WDM/KS interfaces or switch to VAC 3 because it is a legacy MME driver.

Windows 6.x don't limit number of MME/DirectSound endpoints.

Don't create more cables than really needed. Having many audio devices in your system, especially in Vista/Server 2008/Win 7, you may experience excessive system overhead due to very slow endpoint processing. For example, creation of 16-20 cables may keep Windows 100% loaded during a minute after each driver startup (system boot process, installation or restart from Control Panel) before all audio devices become accessible. Creating 100 cables in Vista/Server 2008/Win 7 may cause up to 15-20 minutes of full load before Windows finishes endpoint processing and all audio devices become accessible.

Cable list update in the Control Panel is slow when there are many cables. Audio application startup also may take a long time due to device initialization.

Moreover, creating too many (100 and more) cable devices can cause other audio devices to disappear. Use this feature with care.

Also don't set Milliseconds per interrupt to a small (1..3 ms) value unless really needed. Very small values significantly increase system time interrupt frequency and overhead. On a slow machine, you may experience performance degradation instead of raising it.

Don't enable cable volume control features unless really needed. If you don't need a volume control, keep it disabled to improve sound quality and minimize CPU load.

Restarting the driver

After changing number of cables and/or maximum instance count, VAC driver must be restarted to apply changes. The Control Panel tries to automatically restart the driver. You also can manually restart the driver using the Restart button (for example, to prolong a silent period in trial version).

To restart the driver, VAC Control Panel needs to be started with administrative privileges.

Additionally, driver restart is possible only if there are no active streams (no cables are currently used by client applications). So you need at least to stop all recording/playback using Virtual Cable devices. If number of cables is changed, it is strongly recommended to close all audio applications before restarting the driver.

If you have configured a Virtual Cable device as a default playback device and system event sounds are enabled, it may prevent VAC driver from being restarted dynamically. To be able to restart the driver dynamically, either disable system sounds or change default playback device to a hardware audio adapter.

If Control Panel cannot automatically restart the VAC driver, number of cables and/or maximum instances count will be changed after Windows restart.

Restarting System Audio Engine

In some rare cases, when System Audio Engine seems to work incorrectly (stops accessing some endpoint, reports invalid parameters etc.), you can restart it without rebooting Windows. To do that, stop all audio streams and close all audio applications. Then click Restart Audio Engine button.