Updated
This commit is contained in:
parent
e887e4f4da
commit
55006980f5
@ -1,4 +1,4 @@
|
||||
![audio-visual.sh and alsamixer](/img/sshot.jpg)
|
||||
![audio-visual.sh and alsamixer](/img/sshot.png)
|
||||
|
||||
.asoundrc (Должно быть в ~/)
|
||||
Нужно поменять rockchipes8316c, на вашу карту (aplay -L)
|
||||
|
BIN
img/sshot.jpg
BIN
img/sshot.jpg
Binary file not shown.
Before Width: | Height: | Size: 118 KiB |
BIN
img/sshot.png
Normal file
BIN
img/sshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
@ -60,12 +60,12 @@ void sig_handler(int sig) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void print(int y, int x, char *str, int val, int j) {
|
||||
if (val < 0)
|
||||
mvprintw(y + j, x, "%s", str);
|
||||
void print(int middle, int k, int x) {
|
||||
if (values[x] < 0)
|
||||
mvprintw(middle + k, x, "@");
|
||||
|
||||
else
|
||||
mvprintw(y - j, x, "%s", str);
|
||||
mvprintw(middle - k, x, "@");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
@ -82,7 +82,7 @@ int main(void) {
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
|
||||
int middle = ws.ws_row / 2;
|
||||
int middle = (int)ws.ws_row / 2;
|
||||
while (1) {
|
||||
args = 0;
|
||||
stdin_read();
|
||||
@ -99,9 +99,9 @@ int main(void) {
|
||||
else if (val > max)
|
||||
max = val;
|
||||
|
||||
int lvl = (val - min) * (ws.ws_row / 5) / ((max - min) + 1);
|
||||
for (int j = 0; j < lvl; j++)
|
||||
print(middle, i, "$", values[i], j);
|
||||
/* Main */
|
||||
int lvl = (val - min) * (middle - 5) / ((max - min) + 1);
|
||||
print(middle, lvl, i);
|
||||
}
|
||||
|
||||
refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user