Patch to add adplug options to Adplug plugin + a potential issue w/libadplug
There are 4 parameterized options in the adplug plugin. Since I was having an issue with it, I decided to add GUI widgets for easier adjustment while I was at it, though I used the defaults for the tests, see attached.
The issue I was having seems to involve the current 64-bit Linux production version of libadplug (v2.2.1+dfsg3-0.4) involving Audacious's probing of certain live streams (one in particular that always fails is: http://188.8.131.52:9120/). Adplug doesn't play this stream (nor should it), but CRASHES Audacious (not a segfault, but a memory dump with an error msg describing an attempt to free a bad or empty string in libadplug) when probing tries the adplug plugin on it. The line that fails is: adplug-xmms.cc:line 265:
@CPlayer *p = CAdPlug::factory (filename, &tmpopl, CAdPlug::players, fp);
using latest Audacious GIT asof 12/7. "adplay" will simply refuse to play the stream w/o error though. The pbm does not occurr with the same stream, or at all, afaict, on my 32-bit box running Stretch(Debian), but does on my 64bit box running Testing, but Audacious & libadplug are the same version (latest) on both. I corrected by downloading and building latest GIT for libadplug (http://adplug.github.io/download.html) and rebuilt Audacious, eliminating the crashes. I apologize for not providing the dump or valgrind, b/c I've corrected the pbm and thus can't easily reproduce now, and I didn't save b/c I had become convinced that it was not an Audacious bug. I'm just mentioning it as a heads-up & for you to double-check against this stream and either dup. or give me back a "worksforme". :) Either way, FYI, in the process I found and tested several different types of files that Adplug plays and all worked as expected in all cases.
#2 Updated by Jim Turner over 1 year ago
Ok, I went and researched these and changed the descriptions a bit, but feel free to change 'em some more. I also had "stereo" misspelled so that option wasn't working. Actually, nothing was really working since the parameters were only being fetched in ::init(), so now they are fetched in ::play() as well.
"Endless" is a bit interesting as it causes the current song to play continuously unbroken in a loop.
Not sure exactly what "Stereo" really does, but it got sound coming out from both speakers instead of just the left, without using the Channel Mixer. Here's what adplay's manpage says about it:
--stereo Use only stereo samples for playback. The sound stream is just doubled, no further audio processing is done. This option is pretty useless unless you have very obscure audio hardware that only accepts stereo streams. AdPlug only generates mono streams because the OPL2 only generates mono sound.
I also tweaked the debug msg. function a bit to work better by default with AUDINFO.
Anyway, did you get a chance to try that stream I mentioned to see if it crashes Audacious?
#3 Updated by John Lindgren over 1 year ago
I was able to reproduce the crash with adplug 2.2.1 but not with 2.3; it was fixed by this commit: