Tiny Core Extensions > TCE Corepure64

FLTK appls: alsamixergui.tcz versus flit.tcz, different sound volume steps

(1/1)

nick65go:
Both FLTK appls: alsamixergui.tcz and flit.tcz work OK, but sound steps are not-synchronized between them.
For the Master volum control

flit has step=3                  => 0, 3, 9 .. 26.. 51 .. 75..  91, 94, 97, 100
alsamixergui has step=7  => 0, 1, 2,..  8.. 23 .. 49..  78, 85, 91 ,100
 
my opinion is that flit is working linear steps [3], but alsamixergui is not-linear [7]

---
FYI: Also I did a sample [of 2 seconds]

--- Code: ---$ arecord -c2 -d2 -f dat test.wav
$ aplay test.wav
--- End code ---
in TC10-x86 and was clear played with aplay.
But in TC1.11_x64 the same sample is heard as very poor quality, full of noise.

Recording a new sample in  TC1.11_x64 is working OK.

--- Code: ---$ arecord -c2 -d2 -f dat 123.wav & $ aplay 123.wav
--- End code ---
But the sample has bigger size [DOUBLE]. for the same default encoding, Signed 16 bit Little Endian, Rate 48Khz, stereo.

nick65go:
this is for my time-machine (return from the future) history.
In my search to make Fn+F# keys to work (brightness, sound, etc) I try acpid with fltk.And I see that alsamixer-gui is a little misleading; because all the vertical bars are EQUALY long, but their steps are not the same.
 
--- Code: ---tc@box:~$ amixer scontrols
nnumid=15,iface=MIXER,name='Master Playback Volume' [0-87]
numid=6,iface=MIXER,name='Mic Playback Volume'         [0-31]
numid=9,iface=MIXER,name='Capture Volume'                 [0-63]
numid=24,iface=MIXER,name='PCM Playback Volume'     [0-255]
--- End code ---
so, I try my hand at (novice) programming.

--- Code: ---#!/bin/sh
#sound mute/unmute for acpid
MST=`amixer controls | grep 'Master Playback Switch' | cut -d, -f1`
if [[ -z `amixer cget $MST | grep "values=on"` ]]
 then
  amixer cset $MST on
 else
  amixer cset $MST off
fi
--- End code ---

--- Code: ---#!/bin/sh
#sound-up for acpid
MST1=`amixer controls | grep "Master Playback Switch" | cut -d, -f1`
amixer cset $MST1 on

MST2=`amixer controls | grep "Master Playback Volume" | cut -d, -f1`
VOL=`amixer cget $MST2 | grep ": values=" | cut -d= -f2`
[[ $VOL -le 83 ]]  && amixer cset $MST2 `expr $VOL + 4`
--- End code ---

--- Code: ---#!/bin/sh
# sound-down.sh for acpid
MST2=`amixer controls | grep "Master Playback Volume" | cut -d, -f1`
VOL=`amixer cget $MST2 | grep ": values=" | cut -d= -f2`
[[ $VOL -ge 4 ]] && amixer cset $MST2 `expr $VOL - 4` && exit
MST1=`amixer controls | grep "Master Playback Switch" | cut -d, -f1`
amixer cset $MST1 off
--- End code ---

Navigation

[0] Message Index

Go to full version