Err, forgot to CC the list... ---------- Forwarded message ---------- From: Albert Santoni <[email protected]> Date: Fri, May 22, 2009 at 2:39 PM Subject: Re: [Mixxx-devel] LADSPA on OS X To: Adam Davis <[email protected]>
Hi Adam, On Fri, May 22, 2009 at 1:56 PM, Adam Davis <[email protected]> wrote: > Hi Albert, > > Thanks for your patch -- the LADSPA tab now shows up in Mixxx. > > It looks like -fPIC was already part of the g++ build flags, although it's > only showing for the .os files and not the .dylib: > > scons: done reading SConscript files. > scons: Building targets ... > g++ -o lib/ladspa/caps/Compress.os -c -fPIC -Ilib/ladspa > lib/ladspa/caps/Compress.cc > g++ -o lib/ladspa/caps/Phaser.os -c -fPIC -Ilib/ladspa > lib/ladspa/caps/Phaser.cc > g++ -o lib/ladspa/caps/Reverb.os -c -fPIC -Ilib/ladspa > lib/ladspa/caps/Reverb.cc > g++ -o lib/ladspa/caps/caps.dylib -dynamiclib lib/ladspa/caps/Compress.os > lib/ladspa/caps/Phaser.os lib/ladspa/caps/Reverb.os > > I'm not sure if that's right or if the intention is that the -fPIC show up > for the dylib as well. I tried adding the following to my SConscript in > lib/ladspa/caps: > > env.Append(CCFLAGS = '-DPIC') > > But this just made the -fPIC flag show up twice in the build output messages > above. Ok, that was a bit of a shot in the dark, I wouldn't worry about it then. > > As far as fixing the search paths, I have it working now by uncommenting > much of the ladspa-related code from main.cpp and declaring plugin_paths as > extern in ladspaloader.cpp. If that's a reasonable way to do it, I'm happy. > There's probably a nicer way to do it (making it a class member), but I'll be able to advise you better later whenever you want me to review the code in your branch. > Once I can get the plugins loading properly (and assuming the plugin_paths > fix sounds alright) I'll commit my changes. Sounds good. I've got some good news - I think I figured out why Mixxx didn't seem to think those plugins are valid. LADSPA plugins are just regular shared libraries that happen to have a bunch of special functions defined, as specified by ladspa.h. If those functions/symbols are missing, then the shared library won't look like LADSPA plugin, and so that made me want to take another look at the source for the plugins we have in lib/ladspa/cmt and lib/ladspa/caps. It turns out, in the "caps" directory, there's no source file which declares the required function: const LADSPA_Descriptor *ladspa_descriptor (unsigned long i) After discovering, I downloaded the original caps source (which includes many more plugins than I stole the source from), and spotted a file called "interface.cc" which contains that magic function. So it looks like I: A) Didn't know what I was doing when I forked the caps/cmt libraries B) Didn't copy all the files I needed from their sources over. So what I would recommend doing is: 1) Grab the caps library source: http://quitte.de/dsp/caps.html#Download 2) Copy that interface.cc file over to our caps directory. 3) Hack up that interface.cc file so it compiles with only the couple of plugins we want. If you need to drag in more source files from caps, feel free to do so. I think there was a reason why I didn't fork the entire caps source tree, but I can't remember why. Even though there's plugins we don't want to use from caps, we can simply not write preset .xml files for those. I haven't checked for sure, but I suspect I screwed up the cmt library in the same way. So check out the source code I have and look for any missing required LADSPA functions. It might be that same descriptor one that I missed by leaving out some innoncent-looking source file. Thanks! Albert > > On Fri, May 22, 2009 at 4:59 AM, Albert Santoni <[email protected]> wrote: >> >> Hi Adam, >> >> Sounds like you've done some great troubleshooting so far, and I'm glad >> you emailed me when you did. I totally forgot that we "disabled" the >> LADSPA tab in the main Mixxx UI as we were preparing for the 1.7 >> release. Sorry about this! >> >> I've attached a patch that re-enables the LADSPA tab, and you should >> apply this to your local copy of Mixxx. However, before you do that, now >> is probably a good time to create a LADSPA branch with BZR for yourself. >> The 1.7 branch you're working on is the correct place to start, and >> that's what you want to branch from for your new LADSPA branch. >> >> In order to turn your local "checkout" of the 1.7 branch into a new >> branch, all you'll need to do is run "bzr unbind" in the checkout's >> directory. This will turn your local directory into a new branch. Once >> you've done that, try applying my patch, commit your changes ("bzr >> commit"), and then "push" your branch to Launchpad to make it public by >> running: >> >> bzr push lp:~userid/mixxx/features_ladspa2 >> >> I hope this helps! Creating a public LADSPA branch will help others >> contribute easier hopefully. :) >> >> I should also mention that I've just given my LADSPA-enabled Mixxx build >> a shot on Linux, and it doesn't detect the LADSPA plugins either. It >> sounds like the plugin search path problem probably happens on all >> platforms. >> >> Regarding the LADSPA libraries on OS X, I would check to see what >> compiler flags are being passed to GCC when we're building the plugins. >> It's possible that we're missing some magic flags that would make it >> work. (We might need -fPIC, off the top of my head? Maybe try editing >> the SConscript files in the lib/ladspa/cmt and caps dirs to add that as >> a CCFLAG.) >> >> Anyways, if you get stuck with BZR, SCONS, or anything really, feel free >> to ask more questions or hop onto #mixxx on Freenode. There's usually at >> least one person around to help. :) >> >> Thanks, >> Albert >> >> On Thu, 2009-05-21 at 23:43 +0100, Adam Davis wrote: >> > Hi Albert and Garth, >> > >> > I've been looking at the LADSPA issue in my spare time over the last >> > few days. It looks to me like both of Albert's suggestions ended up >> > being culprits: near as I can tell, there is a problem with paths in >> > the LADSPA loader (there are none) and when I force a path in and it >> > finds the plugin, it says the file isn't a valid LADSPA plugin. >> > >> > The constructor for LADSPA loader declares QStringList plugin_paths on >> > the 2nd line and then immediately tries to iterate over the members of >> > plugin_paths which is (of course) empty. Presumably the plugin_paths >> > that is meant to be referenced is the global one declared in main. >> > >> > To test that the LADSPALoader was at least functioning, I hard-coded >> > the path to caps, at which point Mixxx said: >> > >> > Debug: [Main]: "The file [...]* caps.dylib is not a LADSPA plugin" >> > >> > The first problem (no paths in LADSPA loader) seems very strange to >> > me, as presumably it would affect all platforms, but I had understood >> > LADSPA functions on (at least) Linux from a standard build. Have I >> > grabbed the wrong version of mixxx for testing LADSPA (1.7 from bzr as >> > recommended here: >> > http://www.mixxx.org/wiki/doku.php/compiling_on_os_x)? Should I be >> > looking in svn? >> > >> > It's perhaps worth noting that not only do the plugins not get loaded, >> > but none of the GUI (menus, tab, etc) associated with LADSPA show up >> > when I launch Mixxx. I'm not sure if Q just doesn't bother creating >> > the view if it doesn't find any plugins or if this, too, is strange >> > behavior. >> > >> > Any guidance would be appreciated. >> > >> > Thanks, >> > >> > -Adam >> > >> > *Path changed to protect the innocent >> > >> > On Tue, May 19, 2009 at 5:41 PM, Albert Santoni <[email protected]> >> > wrote: >> > Hi Adam, >> > >> > What Garth just said is not quite up to date. The "cmt" and >> > "caps" >> > LADSPA plugin collections get compiled when Mixxx is built, >> > and you'll >> > find their source in the "lib/ladspa" directory in our source >> > tree. >> > They get compiled on Linux and OS X. Getting them to compile >> > on a >> > non-POSIX system (Windows) looked like it was going to be a >> > bit of >> > work, so the plan is to just steal Audacity's precompiled >> > LADSPA >> > plugins and bundle those on win32 (rather than compiling them >> > ourselves). >> > >> > Let's only worry about caps and cmt for now. I don't know if >> > there was >> > a reason I didn't roll swh-plugins into our tree or not, but >> > we can >> > try playing with those plugins later. >> > >> > With the caps and cmt libraries, the important thing to note >> > is that >> > multiple plugins are rolled into a single dynamic linking >> > library >> > (.dylib on OS X). For example, the wiki mentions that both the >> > Compressor plugin and PlateReverb live inside >> > caps.so/caps.dylib. >> > >> > So to half-answer Adam's original question - I don't know >> > whether its >> > a path issue or a compile issue with the plugins. The plugins >> > originally used a nasty Makefile, so I rolled my own >> > SConscript to >> > compile each plugin collection. It's quite possible that I >> > messed up >> > something there, although I'm pretty sure I had this working >> > at some >> > point. My gut feeling is that it's a path issue since I don't >> > remember >> > copying the libraries over into the Mixxx.app bundle at any >> > point. >> > >> > A place I would suggest starting is by putting some qDebug()'s >> > around >> > where the code that spits out: >> > >> Debug: [Main]: LADSPA: Plugin "Compress" not found >> > (required by preset "Compressor" ) >> > >> > >> > (qDebug() is Qt's equivalent to printf(), but a bit more >> > powerful.) We >> > should figure out what path our code is actually looking in >> > for those >> > plugins.... >> > >> > Thanks, and great to hear you're interested in working on >> > LADSPA. We >> > need your help! >> > Albert >> > >> > >> > >> > On Tue, May 19, 2009 at 5:17 AM, Garth Dahlstrom >> > <[email protected]> wrote: >> > > Hi Adam, >> > > >> > > Unfortunately, I've not yet had a chance to play with it >> > myself on OSX, so I >> > > can't say for how it works, but I can tell you how it works >> > on Windows and >> > > Linux... >> > > >> > > Mixxx only comes with the plug-in mappings for a handful of >> > LADSPA plugins >> > > (see http://www.mixxx.org/wiki/doku.php/ladspa), we don't >> > actually >> > > distribute the actual plugins with Mixxx, they must be >> > either built or >> > > downloaded separately. I've had success using the Audacity >> > prebuilt >> > > plug-ins for Windows and Ubuntu LADSPA packages (seen on the >> > wiki page), so >> > > there is a good chance prebuilt ones for OSX will work too >> > (if we haven't >> > > messed up the paths). >> > > >> > > 2 of the 5 (DJFlanger and karoke) we have plug-in mappings >> > come from "swh", >> > > it looks like there is a Mac package available from SWH from >> > here: >> > > http://audacity.sourceforge.net/download/plugins... So it >> > might be easiest >> > > to start there. >> > > >> > > Let me know how it goes. >> > > >> > > Cheers, >> > > >> > > -G >> > > __ >> > > --- == __/ t.O ==-- >> > > http://stacktrace.org/ >> > > >> > > >> > > On Tue, May 19, 2009 at 4:54 AM, Adam Davis >> > <[email protected]> wrote: >> > >> >> > >> I've just built Mixxx on Mac OS X (without any issues, >> > really -- kudos for >> > >> the good documentation here: >> > >> http://www.mixxx.org/wiki/doku.php/compiling_on_os_x). >> > >> >> > >> Well, ok, there's one issue: I tried to get the LADSPA >> > plugins working (in >> > >> hopes of seeing whether I might not be in over my head >> > trying to contribute >> > >> patches to get LADSPA closer to release). >> > >> >> > >> To summarize what I can see: ladspa support is enabled when >> > I build: >> > >> >> > >> LADSPA support... enabled >> > >> >> > >> But Mixxx fails to load the plugins on startup: >> > >> >> > >> Debug: [Main]: LADSPA: file >> > "../res/skins/outline/../../ladspa_presets/." >> > >> Debug: [Main]: LADSPA: file >> > >> "../res/skins/outline/../../ladspa_presets/.." >> > >> Debug: [Main]: LADSPA: file >> > >> "../res/skins/outline/../../ladspa_presets/compressor.xml" >> > >> Debug: [Main]: LADSPA: Plugin "Compress" not found >> > (required by preset >> > >> "Compressor" ) >> > >> >> > >> It's not clear to me whether this is simply a path issue >> > (the ladspa >> > >> plugins are appropriately built and just not being found by >> > Mixxx) or >> > >> whether the plugins aren't properly built for OSX. I see >> > that one of the >> > >> TODO's here http://www.mixxx.org/wiki/doku.php/ladspa >> > suggests the plugins >> > >> need to be built for OS X. Any suggestions as to how to >> > proceed? >> > >> >> > >> Thanks. >> > >> >> > >> -Adam >> > >> >> > >> >> > >> >> > >> > ------------------------------------------------------------------------------ >> > >> Crystal Reports - New Free Runtime and 30 Day Trial >> > >> Check out the new simplified licensing option that enables >> > >> unlimited royalty-free distribution of the report engine >> > >> for externally facing server and web deployment. >> > >> http://p.sf.net/sfu/businessobjects >> > >> _______________________________________________ >> > >> Mixxx-devel mailing list >> > >> [email protected] >> > >> https://lists.sourceforge.net/lists/listinfo/mixxx-devel >> > >> >> > > >> > > >> > > >> > >> > ------------------------------------------------------------------------------ >> > > Crystal Reports - New Free Runtime and 30 Day Trial >> > > Check out the new simplified licensing option that enables >> > > unlimited royalty-free distribution of the report engine >> > > for externally facing server and web deployment. >> > > http://p.sf.net/sfu/businessobjects >> > > _______________________________________________ >> > > Mixxx-devel mailing list >> > > [email protected] >> > > https://lists.sourceforge.net/lists/listinfo/mixxx-devel >> > > >> > > >> > >> > > > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Mixxx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mixxx-devel
