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

Input Multiplexer (IMUX)


IMUX is a virtual recording engine that permits up to 8 audio recording applications to run at the same time. Generally most soundcards permit only a single recording application to record the input source (via mic, line or CD). With IMUX, you can use up to 8 recording applications to record the same source in different sample rates, bits/sample and channels (mono/stereo). IMUX does all the rate and format conversion in software. The applications think that they are actually getting data from the physical device. For instance, if you want to record the input from a CDROM in .wav format at 48Khz/8/Mono and at the same time you want to record the same stream in .mp3 format in 44.1Khz 16 bit stereo, with IMUX, you can start the wave recording application on the first IMUX device and start the MP3 encoder on the second IMUX device and both applications will run simultaneously thinking that they are getting data from the physical soundcard.


  • Run soundconf, configure the soundcard and then select "Add new card or device" option. Then select the "4Front Technologies Input Multiplexer (*BETA*)" device from the list of available devices.
  • Now run soundon and type cat /dev/sndstat - you will get 5 additional devices under the "Audio Devices" heading marked as "IMux CH NN". These devices will be numbers /dev/dspN through /dev/dspN+5 where /dev/dspN is the first Input Multiplexer audio device after the "physical" audio device. See below:
    Audio devices:
    0: Crystal Semiconductor CS4281 (DUPLEX)
    1: Crystal Semiconductor CS4280 (playback only)
    2: IMux CH #0 (QSRC)
    3: IMux CH #1 (QSRC)
    4: IMux CH #2 (QSRC)
    5: IMux CH #3 (QSRC)
    6: IMux CH #4 (QSRC)
    Synth devices:
    1: Yamaha OPL-3
    Midi devices:
    0: CS4281 UART 401
    0: System clock
    0: Crystal Semiconduct AC97 (CS4297A)

Testing Input Multiplexer

Connect an input source to the soundcard's line-in jack. Using the Mixer app like ossmix (or any OSS compliant mixer) set the recording source to Line-In (eg ossmix line.rec ON) Now you can start recording the input in multiple formats and at different sample rates. The simplest example is:
/usr/lib/oss/record -s48000 -b16 -S  -d/dev/dsp3 test1.wav &
/usr/lib/oss/record -s8000 -b8  -d/dev/dsp5 test2.wave &
After a few minutes of recording you can stop them by placing the command in forground mode (type fg %1 or fg %2) and press ^c to stop.

You now have two wav format files. test1.wav is a 48KHz 16bit stereo file and test2.wav is a 8Khz 8bit Mono file.

You can now playback the files as follow:
/usr/lib/oss/play -v test1.wav and it should show you that the file is indeed 48Khz 16bit stereo.
/usr/lib/oss/play -v test2.wav - you should see that this file is indeed a 8Khz 8bit mono file.

What you have essentially accomplished is recording a single input stream into two different formats at the same time!.

You can now extend this analogy to record the input in mp3 format and RealAudio format simultaneously!

New Features

  • Upto 32 Input Multiplexer devices can now configured via soundconf->Configuration options->imux_devices

    Future Development

    Here's what's planned for the Input Multiplexer
    • Independant recording gain controls
    • Support for mmap()
    • Advanced 3D effects applied during recording