This commit is contained in:
Your Name 2024-02-11 13:07:58 +03:00
parent 67961e9c87
commit 12e89027f9
3 changed files with 4 additions and 14 deletions

View File

@ -1,10 +1,10 @@
![audio-visual.sh and alsamixer](/img/sshot.jpg)
git clone https://git.thedroth.rocks/8nlight/micro-utils
cc micro-utils/miscutils/spark.c -o spark
cc micro-utils/miscutils/spark.c -o ~/spark
.asound (Должно быть в ~/)
Нужно поменять rockchipes8316c, на вашу карту
audio-vis.sh
Нужно поменять путь до spark
Нужно поменять путь до spark (по умолч ~/spark)

View File

@ -1,20 +1,11 @@
pcm.MAUDIO {
type hw
#Edit card
card rockchipes8316c
device 0
subdevice 0
nonblock true
}
ctl.MAUDIO {
type hw
#Edit card
card rockchipes8316c
buffer_size 10000
period_size 8192
}
pcm.loopin {
type plug
slave.pcm "hw:Loopback,0,0"

5
audio_vis.sh Executable file → Normal file
View File

@ -1,5 +1,4 @@
#!/bin/sh
cols=82
cols=124
clear
arecord -q -c 1 --period-size=100 --buffer-size=250 -f U16_LE -t raw -D loopout | hexdump -e ''$(expr $cols + 1)'/4 "%o ""\n"' | tr -d '*' | xargs -n $cols -r ./spark -n -r
arecord -q -c 1 --period-size=256 --buffer-size=512 -f S24_LE -t raw -D loopout | hexdump -e '/4 "%d "' | tr -d '-' | tr -d '*' | xargs -n $cols ~/spark -n