FOSS Mixer

FOSS Mixer is mixer application for FreeBSD with OSS audio backend to set soundcard parameters. Mixer can be use to control audio levels, set recording source, and it includes white noise generator for testing the audio output. It is pretty much what mixer(8) does.

FOSS Mixer supports only FreeBSD, there is no way to get it to work on other systems.

User interface

There is various knobs for controlling the mixers, most notably knob for changing the mixer on upper right corner, and recording source selector on the upper left corner. Rest of the knobs and sliders should be clear what they are for. Each control has little green light nearby which lights if that control is supported by the mixer currently selected. When the light is yellow, it indicates currently selected recording source.

If Bass and Treble controls are disabled (the green led is off), try setting:

hint.pcm.0.eq="1"
hint.pcm.1.eq="1"

in /boot/device.hints. Check the right pcm device numbers in your system from /dev/sndstat.

White noise generator is useful to test if selected audio output works. Please note that audio level of the noise can be quite loud. Roll the Noise Vol down before switching the noise on, especially if you are using headphones!

Compilation

Go to apps directory in package root, and run ./build.sh fossmixer to distribute needed files to package's root directory. After that, go back to .. and run ./configure and gmake, then start or install the application.

Example steps:

$ cd apps
$ ./build.sh fossmixer
$ cd ..

To try app without installing it:

$ ./configure --prefix=`pwd` \
              --enable-debug \
              --disable-output \
              --disable-extended \
              --disable-color \
              --disable-menu \
              --disable-coords \
              --disable-draw \
              --disable-bob \
              --disable-math \
              --disable-remote \
              --disable-image \
              --with-libiconv=/where/is/your/libiconv \
              --with-libintl=/where/is/your/libintl
$ gmake
$ ./fossmixer.debug

Or, to install fossmixer:

$ ./configure --prefix=/install/root/for/app \
              --enable-native \
              --disable-output \
              --disable-extended \
              --disable-color \
              --disable-menu \
              --disable-coords \
              --disable-draw \
              --disable-bob \
              --disable-math \
              --disable-remote \
              --disable-image \
              --with-libiconv=/where/is/your/libiconv \
              --with-libintl=/where/is/your/libintl
$ gmake
$ gmake install
$ /install/root/for/app/bin/fossmixer

Try setting fossmixer.widget.fontFace to Acme-Regular.ttf or Antonio-Regular.ttf font from Google in fossmixer.res, they look very nice with FOSS Mixer, much better than default Noto font.

Screenshots

FreeBSD OSS mixer

Preview

;
; @ANO_SCRIPT_NAME		FOSSMixer
; @ANO_SCRIPT_VERSION		0.0.5
; @ANO_SCRIPT_DESCRIPTION	FreeBSD OSS Mixer
; @ANO_SCRIPT_COPYRIGHT		Jani Salonen <salojan@goto10.co>
;
; Named parameters for Ano script binded functions are defined here:
;
; @ANO_FN_NAMED_PARAMS		"apps/fossmixer/fossmixer_fn_params.txt"
;
; @ANO_FLAGS_USE_PROTOS		[x]
; @ANO_FLAGS_VAR_NAME_SUBS	[x]
; @ANO_FLAGS_VAR_WARN_UNUSED	[ ]
;
; @TAG_ATTR_CONTACT		Jani Salonen <salojan@goto10.co>
; @TAG_ATTR_HOMEPAGE		https://detroit.sourceforge.net/app_fossmixer.html
;
; Copyright (c) 2016-2024, Jani Salonen <salojan@goto10.co>
; All rights reserved.
;

proto callback cb_open (a)
proto callback cb_destroy ()
proto callback cb_turn_mixer_sel (a, b, c, d, e, f)
proto callback cb_turn_mixer_rec (a, b, c, d, e, f)
proto callback cb_turn_mixer_mix (a, b, c, d, e, f)
proto callback cb_turn_mixer_ext (a, b, c, d, e, f)
proto callback cb_push_mixer_tst (a, b, c, d, e, f)
proto callback cb_turn_mixer_tst_vol (a, b, c, d, e, f)
proto callback cb_turn_mixer_tst_pan (a, b, c, d, e, f)

main {
	; Global uninitialized variables
	var	[handle] hnd_wnd_main

	; Initialize windowing system
	window_init

	; Open main window
	window_open (\
		title_name:		"FOSS Mixer", \
		title_charset:		NULL, \
		parent_handle:		[handle] NOPARENT, \
		widget_stack_id:	[uint] 1, \
		widget_set:		[uint] 0, \
		window_refresh_divider:	[uint] PASSIVE_REFRESH, \
		position_x:		[int] POS_CENTERED, \
		position_y:		[int] POS_CENTERED, \
		size_width:		[uint] 1200, \
		size_height:		[uint] 620, \
		cb_main_loop:		NULL, \
		cb_expose:		NULL, \
		cb_key_press:		NULL, \
		cb_key_release:		NULL, \
		cb_button_press:	NULL, \
		cb_button_release:	NULL, \
		cb_client_message:	NULL, \
		cb_configure_notify:	NULL, \
		cb_destroy_notify:	"cb_destroy", \
		cb_motion_notify:	NULL, \
		cb_map_notify:		NULL, \
		cb_unmap_notify:	NULL, \
		cb_open_notify:		"cb_open")
}

;
; Window callbacks
;

callback cb_open (_hnd) {
	mov	hnd_wnd_main (_hnd)

	; Construct user interface
	bsd_prepare (\
		window_handle:		hnd_wnd_main)

	if rc == 0 : cb_open_ok

	; Leave if constructing user interface failed
	window_close (\
		window_handle:		hnd_wnd_main)

	exit

cb_open_ok:
	; Map main window if constructing user interface was ok
	window_map (\
		window_handle:		hnd_wnd_main)
}

callback cb_destroy {
	window_close (\
		window_handle:		hnd_wnd_main)

	bsd_disperse

	exit
}

;
; Widget callbacks
;

callback cb_turn_mixer_sel (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_sel (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_turn_mixer_rec (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_rec (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_turn_mixer_mix (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_mix (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_turn_mixer_ext (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_ext (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_push_mixer_tst (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_tst (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_turn_mixer_tst_vol (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_tst_vol (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}

callback cb_turn_mixer_tst_pan (_widget_name, _widget_id, _min, _max, _steps, _step) {
	bsd_mixer_tst_pan (\
		widget_name:		_widget_name, \
		steps:			_steps, \
		step:			_step)
}
;
; The purpose of this file is to allow named parameters in Ano script when
; calling functions listed below. This file is defined in Ano script by
; @ANO_FN_NAMED_PARAMS tag. See the Ano script for live use.
;
; Functions are declared as:
;
;  function_name(name_of_parameter_1, name_of_parameter_2, ...)
;
; That allows functions to be called in Ano script like:
;
;  function_name (\
;	name_of_parameter_1: value_1, \
;	name_of_parameter_2: value_2)
;
bsd_prepare(window_handle)
bsd_disperse()
bsd_mixer_sel(widget_name, steps, step)
bsd_mixer_rec(widget_name, steps, step)
bsd_mixer_mix(widget_name, steps, step)
bsd_mixer_ext(widget_name, steps, step)
bsd_mixer_tst(widget_name, steps, step)
bsd_mixer_tst_vol(widget_name, steps, step)
bsd_mixer_tst_pan(widget_name, steps, step)
;
; Copyright (c) 2016-2024, Jani Salonen <salojan at goto10 piste co>
; All rights reserved.
;
; @WIDGET_USE_BOUNDING_BOXES no
;

window "1" {
	set "0" {
		widget "background" {
			name		"bg"
			state		enable

			image		"@/share/fossmixer/fossmixer_bg.tga"
		}
	}
}

Copyright © 2024, Jani Salonen <salojan at goto10 piste co>. Piste is finnish word and means dot. All rights reserved.