karlstav
d0464274bb
removed old terminal cleanup
11 years ago
karlstav
74c1569b19
added more cleanups in the optargs
11 years ago
karlstav
4824e0ff4b
added handle for tiny terminal width fixing #32
11 years ago
karlstav
19937a6c0b
moved signal and terminal preperation to before getopts, fixing terminal screwup when specifying invalid prams
11 years ago
An Ko
1aabc2116a
Portable ncurses build
...
Fixes karlstav/cava#4 .
11 years ago
karlstav
b3c4d3bd54
fix fps = 1 after sleep bug
11 years ago
karlstav
fda69d46ea
fix framerate handling, better center adjustment, cleaning
11 years ago
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
karlstav
da9be64f7d
improved fontfile for tty, 8 is now fullblock
11 years ago
sjef
ccbe7d32b2
Fix typos
11 years ago
karl
7a5e18199e
improved filters
...
changed order of filters, fallof -> monstercat -> integral
11 years ago
karlstav
ffbd04c728
first ncurses commit
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