oss_imux(7)

πŸ“¦
version 4.2-build2020 Β· 3 versions
, in ubuntu noble

✨ NAME ✨

ok so bestie, welcome to oss_imux β€” the Input Muplexer audio driver πŸ’– (yes it's a 7, it's a driver, we're in OSS Devices territory, stay with me)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: IMUX is a virtual recording engine that lets up to 8 audio recording applications run at the SAME time. no cap. πŸ”₯

normally, most soundcards are giving "one recording app only, that's the rule" β€” you get to record the input source (via mic, line or CD) exactly once and that's it, tragic. but with IMUX?? you can have up to 8 recording applications all recording the same source, each at their own sample rates, bits/sample and channels (mono/stereo). πŸ’…

IMUX does all the rate and format conversion in software. the applications literally think they're getting data from the physical device. it's giving main character energy from the driver's side fr fr.

for instance β€” imagine you wanna record the input from a CDROM in .wav format at 48Khz/8/Mono and at the same time you wanna record that exact same stream in .mp3 format in 44.1Khz 16 bit stereo. with IMUX you just start the wave recording application on the first IMUX device, start the MP3 encoder on the second IMUX device, and both applications run simultaneously thinking they're getting data from the physical soundcard. iconic. πŸ‘‘


πŸŽ€ CONFIGURATION πŸŽ€

to add the IMUX driver you first need to make sure there's a physical soundcard present β€” non-negotiable bestie, no soundcard no vibes β€” and then you can run ossdetect -i to add it.

you may want to select a master device by setting imux_masterdev, but honestly the autodetection should provide a good default. 🫢

after OSS restart, imux should be available. slay.


🌸 USAGE 🌸

step one: connect an input source to the soundcard's line-in jack.

then, using the Mixer app like ossmix (or any OSS compliant mixer), set the recording source to Line-In, e.g. ossmix line.rec ON ✨

now you can start recording the input in multiple formats and at different sample rates. the simplest example is:

ossrecord -s48000 -b16 -c2 -d/dev/oss/oss_imux0/pcmin0 test1.wav &
ossrecord -s8000 -b8 -d/dev/oss/oss_imux0/pcmin0 test2.wav &

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.

and now?? you have two wav format files bestie:

  • test1.wav is a 48KHz 16bit stereo file
  • test2.wav is a 8Khz 8bit Mono file

you can now playback the files as follows:

  • ossplay -v test1.wav and it should show you that the file is indeed 48Khz 16bit stereo.
  • ossplay -v test2.wav β€” you should see that this file is indeed a 8Khz 8bit mono file.

what you've essentially accomplished is recording a single input stream into two different formats at the same time. literally so cool 😭

you can now extend this analogy to record the input in mp3 format and RealAudio format simultaneously. go off.

the IMUX control panel can be displayed by typing ossxmix -d<imux mixer number> (for e.g. in the above example, IMUX mixer is #2 so we type ossxmix -d2).

there are record level control sliders for each input channel, and it will show activity when a recording program is active on a particular channel. so you can literally watch it vibing. πŸ¦‹


πŸ’… OPTIONS πŸ’…

  • imux_masterdev β€” selects which physical device to use as the Master device for the IMUX driver. Values: -1: automatically selected by OSS, 1-N: Audio device index of the master device (as reported by ossinfo -a), Default: -1.
  • imux_rate β€” specifies what is the base sampling rate used by the imux driver. Values: 5000-96000 Default: 48000
  • imux_devices β€” specifies number of Input Multiplexer devices to setup. Values: 2-48 Default: 5

πŸ“ FILES πŸ“

  • /etc/oss4/conf/oss_imux.conf β€” Device configuration file.

πŸ’œ AUTHOR πŸ’œ

4Front Technologies


and that's the whole page bestie, no notes πŸŽ€ this one's from 4Front Technologies, dated 11 February 2015, and it lives at oss_imux(7). go record eight things at once, you absolute legend. periodt. βœ¨πŸ’–πŸ«Ά

πŸ“¦ where this page comes from