WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: FLTK appls: alsamixergui.tcz versus flit.tcz, different sound volume steps  (Read 1775 times)

Offline nick65go

  • Hero Member
  • *****
  • Posts: 839
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: [Select]
$ arecord -c2 -d2 -f dat test.wav
$ aplay test.wav
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: [Select]
$ arecord -c2 -d2 -f dat 123.wav & $ aplay 123.wavBut the sample has bigger size [DOUBLE]. for the same default encoding, Signed 16 bit Little Endian, Rate 48Khz, stereo.
« Last Edit: May 14, 2020, 04:48:12 PM by nick65go »

Offline nick65go

  • Hero Member
  • *****
  • Posts: 839
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: [Select]
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]
so, I try my hand at (novice) programming.
Code: [Select]
#!/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
Code: [Select]
#!/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`
Code: [Select]
#!/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
« Last Edit: May 18, 2020, 03:01:03 PM by nick65go »