Re: [mpg123-users] Win32/64 remote control
Brought to you by:
sobukus
From: Thomas O. <tho...@or...> - 2016-01-01 10:45:00
|
Am Fri, 01 Jan 2016 03:55:04 +0000 schrieb Myles <smp...@gm...>: > […] For another example, I'm hearing a Transatlantic song > during my full library shuffle. I pull out my pad/phone and hit one or two > buttons to play just that album, one time […] Interesting idea for runtime playlist management. > working-linux version launches the next LOAD perfectly timed with the end > of a currently playing song. It's virtually gapless. So I need to get the > output no worse than line-buffered. I see a useful feature that I might just add for those situations; having to time the LOAD command to make it "virtually gapless" doesn't really cut it when I worked so hard for proper gapless playback in mpg123. I imagine a command to enqueue the next file to load once this one finishes, LOADNEXT or such. Getting exact timing out of piped commands will always be tricky. > So!, looks like I'm going to have to re-build mpg123 and add flushing to > the output. If I get it working ok, might it be absorbed as a new feature > (--force-line-flush, or something like that). Wish me luck! Well, a first hack would be to add flushing to generic_sendmsg() in control_generic.c (first function in file): void generic_sendmsg (const char *fmt, ...) { va_list ap; fprintf(outstream, "@"); va_start(ap, fmt); vfprintf(outstream, fmt, ap); va_end(ap); fprintf(outstream, "\n"); fflush(outstream); /* Ensure timely appearance of message. */ } (wondering if I should reduce it to one printf call using a copy of fmt there, too) Just add that line in a downloaded source tarball (with generated configure script) and try to build things in MinGW32 shell using windows-builds.sh or plain ./configure && make. I am wondering if that fflush() would hurt if it's always there, not even bothering for a command line switch. Alrighty then, Thomas |