Hi folks,
Soon after releasing 0.13.0b I decided to hack on TTY controls for `madplay'.
The result is here:
ftp://ftp.mars.org/pub/mpeg/testing/tty-0.13.0b.patch
Many thanks go to Matthew Green for his initial implementation of this, although I've taken a slightly different approach.
I've not tested this thoroughly which is why I'm making it available as a patch rather than making a new release. I'd appreciate feedback, especially from anyone using the audio_sun module (Solaris and NetBSD, probably.)
TTY controls are enabled by default unless stdin is not a terminal or the -o (--output) option is used. You can also enable/disable the controls explicitly with --tty-control or --no-tty-control.
The TTY control keys are:
p pause s stop (return to beginning of current file) f forward (skip to next file) b backward (*) q quit i information (non-verbose modes only)
(*) if pressed within the first 4 seconds of a playing file, skip to the previous file; otherwise replay the current file from the beginning
Cheers, -rob
Many thanks go to Matthew Green for his initial implementation of this, although I've taken a slightly different approach.
thanks to you for cleaning it up! i read the patch and i much prefer it to the hacks i had sent you :-)
TTY controls are enabled by default unless stdin is not a terminal or the -o (--output) option is used. You can also enable/disable the controls explicitly with --tty-control or --no-tty-control.
not sure if the latest version i sent you used --control or not, but i had changed it from --tty-control as mpg123 uses --control. FYI. i will be testing this shortly (i see simonb has already added it to the NetBSD pkg for mad, so i assume it works there already. he was using an old version of my patch. :-).
.mrg.