pulseauio thread now uses pthread_exit to exit if something unexpected happens
it also sets audio.terminate to 1 and writes the error message to a audio.error_message
so it can be printed by main thread after cleanup. this also enables main thread to
cleanup terminal upon unexpected error on audio thread
**NOTE: This breaks the `b` and `c` keys for cycling through the colors
in ncurses mode.**
Added a new function in cava.c `int validate_color(char
*colourToValidate, int outputMode)` which returns 1 is the colour is
valid, 0 otherwise.
Validation is done to ensure that HTML colours are of the form `#xxxxxx` or a
named ncurses colour is present.
HTML colours are allowed only when output mode is ncurses (ie `om = 1 ||
om = 2`). HTML and named colours can be mixed.
If the output mode is other than ncurses, the old method of setting
`bgcol` and `col` will be used.
Added a function in `terminal_ncurses.c` called `struct cols
parse_color(char *col)` which returns a struct containing:
1. `col`: The ncurses colour number parsed.
2. `R`, `G` and `B`: Integers that represent the R, G and B values
parsed.
The `init_terminal_ncurses()` method now accepts two character pointers
instead of integers. The pointers contain color names (either HTML or
ncurses names) which are then parsed by the parse function defined
above.
Currently there is no check to find if the terminal supports color
redefinition or not. According to the parsed value we decide whether to
perform redefinition or use the predefined ncurses colours.
Ncurses colours 1 and 2 are redefined for foreground and background
respectively. This means that upon exiting, all the occurrences of 1 and
2 would have been redefined. To fix the colours back to the original the
user has to open another terminal.
seperate files in output dir
ascii and binary mode
8 and 16 bit binary
configurable ascii max limit
working with configurable ascii delimiters, not working yet
setting source to 'auto' (also the default pulse source now)
automatically finds the monitor interface of the defualt sink
this will in most cases be most usefull
people who has manualy specified the old default value: 'defualt'
will now get an error message.