Monday, February 18, 2013

A New Gmu

So once again I was settling down, just letting the todo list grow, when out of the blue wej announces a new release of his gmu music player on the zipit IRC channel.  Gotta try it.



The new large font is big improvement.  And the png file with the new font is actually smaller than the original.   Go figure...

Gmu now comes with an ncurses GUI which can be run from a remote PC.


I couldn't figure out if it has any volume control, and I miss the o and * markers from the SDL frontend.  Also the help messages on the bottom don't all fit on the zipit screen.  But overall, it seems to work.

Update:  Our nitpicking on the zipit IRC channel resulted in a quick update to the new gmu release addressing most of the bug reports and enhancement requests.

I've made a patch to build it with regular non-wide-char ncurses.   Now I just have to package up a full IZ2S build.  For now, I've packed it up without the libs.  If you don't already have them you can get the shared libs for the codecs from one of the older gmu packages and put them in the libs directory on the root of the sd card.

gmu-0.9.1-iz2s-nolibs.zip

Also, here are some tinyirc updates for IZ2S and openwrt that address problems with the command line display for long lines, and some other screen refresh issues in the openwrt build.  The upxed executables are around 13K.  Both tarballs contain the updated source code in addition to the executable.  Someday I'll get it into a github repository.

Note: The IZ2S executable uses the shared ncurses lib posted a while back.

tinyirc-iz2s-cmdfix.tgz
tinirc-wrt-cmdfix-src-bin.tgz

And I might have created a functioning nethack build for openwrt if anyone wants it.  Rumor has it the official packages don't work right now.

And finally, although I was unable to conquer the high CPU usage issue in the openwrt build of gmu, I did build an openwrt version of my IZ2S libSDL with the ALSA buffering patch.  It also has slug's patches for gmenu2x. It smooths out some of the glitches when playing music from slow SD cards and may fix other minor sound issues with SDL programs.  It also allows me to use a shared lib version of rockbox so maybe someday I'll be able to squeeze that onto an openwrt jffs.

libSDL-wrt-alsa-buffered.gz

Here's the patch I used to build it in openwrt.

005-sdl-alsa-buffer.patch


Update January 2016:

I added support for the oss driver because it works better for applications like games and music trackers that require lower latency than streaming audio (the alsa driver works better for that).  To use oss in SDL you'll need to set the SDL audio driver environment variable to dsp.  I usually make a wrapper script to do that for apps that need it.

SDL_AUDIODRIVER=dsp

libSDL-1.2.so.0.11.3-wrt-alsa-oss.tgz

I also finally made a version with the sticky key patch from 2013.  It should allow you to use a sticky keymap with sdl applications, but it's completely untested on openwrt at this point, because I forgot how I did that on iz2s.

libSDL-1.2.so.0.11.3-wrt-alsa-oss-sticky.tgz

Saturday, February 2, 2013

A Fine Selection of... Something?


While on break from my previous break from ever finishing anything I mentioned the Blacklight mp3 player on the zipit IRC channel.  I knew slug was looking for a minimal front end to mpg123 and he seems to like C++ a whole lot more than I do.  We played with some g++ compile/link options and slug managed to get it down to a fairly tiny 16K build for his openwrt jffs.

Unfortunately C++ doesn't reduce nearly as well with the IZ2S compiler.  I only got it down around 34K using uClibc++, a shared lib version of ncurses, the lzma upx, and the magic compiler options.  I can't seem to lose the exception handler code, despite my best efforts.  It also seems to make mpg123 sound a bit worse.

However, Blacklight is really just a file selector at heart, which reminded me of the sel file selector program I tinkered with a while ago, but never really got around to finishing.  The sel program is a capable ncurses based complement to the dialog program  for shell scripted text GUIs.

The original web site is long dead, so I retrieved sel from the wayback machine.  Stripped, upxed, and linked against the shared ncurses lib from the Junk in the Trunk post it comes out around 14K, which makes it small enough to toss onto the jffs.  I added support for some more handy navigation keys on the zipit, made it always quote the filenames, and fixed up the globbing code to tack the glob string (eg. *.mp3) onto selected directories.  This works pretty well to let me select and play whole directories of mp3s, as well as select files to play individually.

    sel -b "Play MP3s" -m "*.mp3" -c "mpg123 -C %" -d /mnt/sd0/music

Here's an updated zip file with the modified sel sources and two executables for IZ2S, one with ncurses static linked, and one shared.

sel-0-08-4-iz2s.zip

Update:  I couldn't leave it alone so I went and tested it in DVTM along with a mini rexima window for the volume control.  I couldn't decide what to put in the 3rd window, so I just ran another copy of sel.  That lets me start one window playing a makeshift playlist and then use the other window to select some more music for later.  I suppose that could be handy, although what I really ought to do is make a sel command that inserts the selected items into an mpg123 command fifo and then simply run mpg123 on the fifo in the 3rd window.

I tweaked the sources a little bit more to get sel working in the tiny window, and I still need to patch the code to handle a window resize.  I'll post a new zip when it all works again.

sel-0-08-04zz-iz2s.zip