Products
Free Download
Order OSS
OSS Forum
Technical Support
Contact 4Front
OSS Programming
Sound Card Support
Application Support


Virtual Mixer Technology

Introduction

Currently the OSS and other drivers only permit a single app to playback audio on standard soundcards. Unless the soundcard like SBLive or Yamaha DSXG has builtin support for multiple streams in hardware, you can only play a single application at a given time.

4Front's Virtual Mixer technology removes this restriction and provides up to 8 virtual sound devices so that you can run up to 8 simultaneous audio applications. Virtual Mixer will do the sample rate conversion and handle the format such as 8 or 16 or 24bit and also handle mono/stereo conversion so that the application sounds like its playing audio natively on hardware. To the application, there is no change required. There are audio daemons like EsoundD(for Gnome) or aRTsD (for KDE) that will allow multiple audio apps to mix output but that often means that the applications have to be written specifically for EsoundD or aRTsD. With OSS's Virtual Mixer, there is no change in the application code because the Virtual Mixer devices behave exactly like the physical hardware. Virtual Mixer will also intelligently handle opening of the virtual devices. It will automatically open the next available virtual device if the current device is busy playing audio. So applications that are hardcoded to open /dev/dsp, will simply open the next available virtual device. See the Screen Shot


Configuration

  • Run soundconf, configure the soundcard and then "Add" the Virtual Mixer device
  • Now run soundon and type cat /dev/sndstat - you will get 8 additional devices under the "Audio Devices" heading marked as "SoftOSS V2.0". These devices will be numbers /dev/dspN through /dev/dspN+8 where /dev/dspN is the first virtual audio device after the "physical" audio device. See below:
    Audio devices:
    0: VIA VT82C686 AC97 controller (DUPLEX,GRC2)
    1: VIA VT82C686 AC97 controller (shadow) (DUPLEX,GRC2)
    2: SoftOSS v2.5 Playback CH #0 (GRC2)
    3: SoftOSS v2.5 Playback CH #1 (GRC2)
    4: SoftOSS v2.5 Playback CH #2 (GRC2)
    5: SoftOSS v2.5 Playback CH #3 (GRC2)
    6: SoftOSS v2.5 Playback CH #4 (GRC2)
    7: SoftOSS v2.5 Playback CH #5 (GRC2)
    8: SoftOSS v2.5 Playback CH #6 (GRC2)
    9: SoftOSS v2.5 Playback CH #7 (GRC2)
    10: SoftOSS v2.5 Record CH #0 (GRC2)
    11: SoftOSS v2.5 Record CH #1 (GRC2)
    
    Synth devices:
    0: SoftOSS v2.0
    
    Midi devices:
    0: VIA97 external MIDI
    
    Timers:
    0: System clock
    1: SoftOSS
    
    Mixers:
    0: VIA VT82C686 (CS4297)
    1: SoftOSS
    

Testing Virtual Mixer

Get a couple of sample wav or au files (in our example below we'll use test1.wav and test2.wav). Now issue the following commands:
/usr/lib/oss/play -d/dev/dsp4 test1.wav &
/usr/lib/oss/play -d/dev/dsp5 test2.wave
You will now hear both wave files playing simultaneously. If you would like to configure the default /dev/dsp file to point to a Virtual Mixer device, then simply delete /dev/dsp and link it to the first available virtual /dev/dsp device (check your output from cat /dev/sndstat). After this any application that opens /dev/dsp by default will use the virtual mixer device. Note that while the virtual mixer device is in use, you cannot use the physical audio devices (/dev/dsp0 and/or /dev/dsp1) and vice versa, ie. if /dev/dsp0 and/or /dev/dsp1 are in use then none of the virtual devices will be accessible. Please also not that the quality of the sound in the virtual devices will not be the same as the the physical devices and mixing and sample rate conversions take place in the virtual mixer software and not in hardware.

New features

  • Professional quality 4 band equalizer - now you can add bass/trebel to any soundcard.
  • Upto 32 Virtual Mixer device can now configured via soundconf->Configuration options->softoss_devices
  • Loopback recording mode for Virtual Mixer - you can now record any audio that's played via virtual mixer. This "record-as-you-play" feature allows you to record audio from Real Player, games, mixed output from multiple apps, etc. Up to 4 recording channels can be configured. To enable the recording mode, run soundconf -> select Configuration options -> select "softoss_loopdevs" and enter the number of loopback recording devices you wish to add. Recorded audio will also include any Equalizer settings so you can record audio with full bass/treble.
  • Reverb
  • Fidelity Enhance - this feature adds back high-frequencies that are lost when wav files are converted to Mp3 or Ogg. This feature is similar to the SRS WoW or QSound or Spatializer effects found in Windows apps
  • 3D Surround - this feature adds stereo field separation and simulated 3D audio spatialization

Using Loopback recording

The loopback recording feature in Virtual Mixer PRO allows you to record any audio stream that's currently playing on any of the virtual mixer devices.

  • To enable the recording mode, run soundconf -> select Configuration options -> select "softoss_loopdevs" and enter the number of loopback recording devices you wish to add (currently limited to a max of 4 loopback devices - so type a number between 1 and 4).
  • Now run soundon and type cat /dev/sndstat and note down the number of the Virtual Mixer record devices (in the above example, they are /dev/dsp10 and /dev/dsp11).
  • Using an xterm window type: /usr/lib/oss/record -s22050 -b16 -c1 -d/dev/dsp10 test.wav
  • Start playing any audio app (eg mp3 using XMMS or RealPlayer) on one of the Virtual Mixer playback devices
  • Once the app finishes playing, press -c (^c) to stop recording
  • Now you can playback audio by typing /usr/lib/oss/play test.wav
The loopback recording will also record any changes to the Virtual Mixer PRO's equalizers. If you play multiple audio apps at the same time it will record all the audio just like you hear it on the speakers. Finally note that loopback recording will do full sample rate conversion. In the example above, we were playing an MP3 using XMMS which is at 44.1Khz/16bit/stereo and we recorded that in 22.05Khz/16bit/mono. You can also run up to 4 different recording apps at the same time. So for instance you can run /usr/lib/oss/record -s8000 -b8 -c1 -d/dev/dsp11 test1.wav and record the same audio in 8Khz/8bit/mono mode. This allows you to capture audio that's being played in different formats at the same time.

Future development

Here's what's planned for the Virtual Mixer:
  • 4Front Surroundizer(tm) and TheatreFX(tm) features - read more about them at http://www.oss3d.com/usite/tech.html