sjef
1d5bd3cab9
Fix typos
11 years ago
sjef
9aec572fa3
Improve comment description for the future
...
smooth and sm might not always be next to each other
11 years ago
sjef
a70273fb16
Fix indentation
11 years ago
sjef
00fb123323
Fix typos
11 years ago
sjef
d9a9fe5e36
Remove unused macro (PI)
11 years ago
sjef
11dac58f08
Use English instead of Norwegian in debug
11 years ago
sjef
c0dc9f24e7
Divide long code line into several short lines
11 years ago
sjef
c3810efdb4
Make comment-style more consistent
11 years ago
sjef
ccbe7d32b2
Fix typos
11 years ago
CelestialWalrus
1a32055275
Prepare for #24
11 years ago
CelestialWalrus
7dc8635fe4
Moved DEBUGs more to the right.
11 years ago
CelestialWalrus
219eca60ed
Fixed usage
11 years ago
CelestialWalrus
e8136bd469
More small changes
11 years ago
CelestialWalrus
f08ab5871b
Removed unnecessary gotod:
11 years ago
CelestialWalrus
7107d7b224
Improved code readability, commented some stuff
11 years ago
Yu-Jie Lin
533b9bfec8
fix exit with no cleanup, change label "exit" to common "out", use EXIT_FAILURE
11 years ago
Yu-Jie Lin
8114d318af
fix misuse of SIGQUIT, better handling signals and user quitting
...
I minused SIGQUIT in 902c08bde0 , should be SIGTERM. The default action Core (also see signal(7)` actually would dump core [1].
SIGTERM is the right choice, however, the default action would exit with 143 instead of 0. I do not want to `exit(EXIT_SUCCESS)`, because if user `pkill cava` not by q key, it should exit with 143. Therefore, I made it `goto exit`.
The (default) signal handlers is used by `signal() [2]`, no need to store `old_action`.
References:
[1]: http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html#index-SIGQUIT
[2]: http://www.gnu.org/software/libc/manual/html_node/Termination-in-Handler.html#Termination-in-Handler
11 years ago
Yu-Jie Lin
aad1e793ac
fix max bars when starting with -S then toggle with s key, use <kbd/> to mark keys. ( #22 )
11 years ago
Yu-Jie Lin
902c08bde0
add key controls
...
Using termios to set MIN=0 for not blocking, also handling `stty -echo`.
11 years ago
Yu-Jie Lin
2a117968c9
fix Segmentation fault after failing to open stream
...
After printing out the error message music() doesn't exit, but continue, that leads to segfault.
11 years ago
Yu-Jie Lin
67bfef75b3
add -v option for printing version ( #17 ), fix -h option text and optstring
11 years ago
karl
ac5c5614c5
tweaking
11 years ago
karlstav
dae38fe1a7
put fifo values into buffer the correct way, fixes #15
11 years ago
Alex Smith
ee6cf78009
"Scientific" mode switch
11 years ago
karl
db805718e2
cleaned up some comments
11 years ago
Yu-Jie Lin
ee8decefc9
make debug option
11 years ago
Yu-Jie Lin
20159637b0
simplify bar character printing
11 years ago
Yu-Jie Lin
bbaaf28961
make usage more coder-friendly
11 years ago
karlstav
f0b9d40fd8
non-blocking fifo read [issue 7]
11 years ago
karlstav
99cb8f4ec8
non-blocking fifo read [issue 7]
11 years ago
Yu-Jie Lin
41825f3462
set -std=c99 -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L, fix warnings and errors
...
* Change type of `rate` to `unsigned` to match, now use 0 for the waiting.
* `sig_no` and `thr_id` are tagged with GCC unused attribute to suppress the warnings.
* Switch to `nanosleep`.
11 years ago
karlstav
2921e98659
styled again with astyle
11 years ago
karlstav
d04c6ef2fb
styled with astyle
11 years ago
Alex Smith
f67bb792b1
More smoothing, looks better IMO.
11 years ago
An Ko
dcf64385f7
Fix initialisation segfault bug
...
Was dying with segfault on my machine since commit. Effectively fixing
up commit f0c1023 .
11 years ago
karl
45d0effdda
bugfix
...
fixed nubmer of bands caused segfault after last update
11 years ago
karl
f0c1023185
resize terminal windows fix + smoothening
...
cava now reinits on terminal window resizing, fixing previous glitchy behaviour
added an "integral filter" (not sure what to call it look at linke 521-523), uses parts of past signals to get a smoothening effect
11 years ago
CelestialWalrus
904f2e87fc
Added FFT easing (Monstercat style)
11 years ago
karl
c7a7c95337
Improved spectrum calculations
...
Changed peak calculation within bands from finding top peak to averaging.
More correct response and less "nervous".
11 years ago
An Ko
3094e2f8ac
Auto-format with astyle
...
astyle --style=linux --pad-oper --max-code-length=80 --keep-one-line-blocks --keep-one-line-statements --convert-tabs --remove-comment-prefix cava.c
11 years ago
An Ko
097e9a3cdc
Remove unnecessary spacing
11 years ago
An Ko
c93ba7d496
Initial pass on clarifying source
...
Some automatic indentation.
11 years ago
karl
ff6ffe8704
changed to fall off when pause, instead of freeze
11 years ago
karl
e8b8fb75c5
turned off echo
...
if cava is force killed echo must be turned on manualy with "stty -echo"
12 years ago
karl
7017b2792f
Update cava.c
...
fixed a bug where default input method was undifened.
12 years ago
karl
3a8486ca3f
added support for fifo (mpd)
...
still not sure if it is 100%, might be a problem with latency/sync
12 years ago
karl
860ac15fec
adjusted some constants
12 years ago
karl
7c4aeb931e
bug fixes
...
chagnged some frequency settings
12 years ago
karlstav
f8d2568d57
bg color/bug fixes
...
added support for changing bgcolor, mainly looks crap but maybe someone whould like it. fixed up the frequency cutof algorithm. Added blanking (screensaver) disabler for tty mode, resets to default at ctrl+c.
12 years ago
karlstav
bc3aebe3de
Update cava.c
...
Moved audio capture to own pthread, added falloff and framerate limiter, looks much much nicer now.
12 years ago