Commit Briefs
fix mp3 length detection
without a call to mpg123_scan the length returned by mpg123_length is not necessarly accurate (well, even in that case it's not guaranteed to be exact, i.e. if a file is modified while it's playing.) fixes the length reporting on some mp3 files i had around.
pledge early
This changed amused to pledge "stdio rpath" early in main() and then drop down to "stdio" in ctlaction, by removing the pledge call in parse. Simplifies a bit the logic and runs more code under pledge.
use (a modified version of) kristaps' oconfigure
see GitHub issue #1
implement seeking
This adds the internal management of the seeking, as well as the decoder backends bits.
improving error reporting
makes the player process optionally send back a string describing the failure to provide a better and more coincise error message. This turns the syslog message(s): amused: unknown file type amused: failed to play, skipping /home/op/pics/phos.jpg into: amused: unknown file type; skipping /home/op/pics/phos.jpg
s/player_setrate/player_setup
when the function was renamed, the error messages weren't.
change play_*() so that they return an integer
this will allow to remove the `got_stop' hack in player.c
drop now unused #include <sndio.h>
with the recent refactoring, sndio is only visible in player.c
switch from libmad to libmpg123
libmpg123 is more "loud" than libmad, at least for the mp3s that I have around. Is also newer and maintained. I've heard is also faster, but amused is so simple that it doesn't make any difference.