Subject: Audacious API changes

From: shd
Date: Sat Feb 3 12:57:51 2007

To: UADE-Developer-discussion
Christian Birchinger aka Joker submitted a patch to partially fix uade with respect to Audacious 1.3 API change. The question is how to handle this change. We don't want to kill pre-1.3 support immediately, so we must keep the old code.

This leaves two alternatives:
 * fork current audacious frontend into two separate lines, we can all the older in the future. This causes code redundancy and thus additional bug fix maintenance, though I suspect not much because they have been pretty stable in the past.

 * Add a swarm of macros that compile differently depending on Audacious version. Code would be slightly more unreadable, but looking at Joker's patch there aren't too many different calls. Function prototypes can be #ifdeffed, but audacious calls do not need #ifdefs necessarily (put them into headers)

I like the second approach more. Michael, what do you think?

---

From: mld/uade team
Date: Sat Feb 3 15:42:09 2007

To: UADE-Developer-discussion
same here... the second approach is best to maintain the fixes for both current stable and alpha audacious. 

But I'm still running the last stable one here, and had no time to look at the api changes.

---

From: shd
Date: Sat Feb 3 21:06:18 2007

To: UADE-Developer-discussion
Nenolod committed a useful change into Audacious SVN repo:
[code:1:1c7e8d0bb5] * r3956 /trunk/src/audacious/plugin.h&#58; - define __AUDACIOUS_INPUT_PLUGIN_API__ to 2 by request of shd
[/code:1:1c7e8d0bb5]
We can use that in the future to preserve backwards compatibility. So something like:

#ifndef __AUDACIOUS_INPUT_PLUGIN_API__
#define INPUT_API 1
#else
#define INPUT_API __AUDACIOUS_INPUT_PLUGIN_API__
#endif

---

From: Melkor
Date: Sun Mar 11 18:32:13 2007

Hi,

Is there any planned change for this ? Audacious 1.3.x is out and I try to package it.

So far, audacious-uade compiles fine but does not work at all and I suspect that the patches shd is talking about in the first post are not merged into source and I can't see nothing related to audacious 1.3 API in uade frontend for audacious  :)

I've tried to use http://www.netswarm.net/misc/uade-audacious-1.3api.patch but it did't help  :cry:

PS: Of course, I'm talking about the latest CVS snapshot of uade  8)

---

From: mld/uade team
Date: Mon Mar 12 10:40:42 2007

To: UADE-Developer-discussion
yes, I didn't merge the patches so far, because I wanted to wait for a stable release of audacious.

I'm quite busy this week, but I try to cope with updating first audacious on my box and uade-plugin at latest until the weekend... maybe sooner... but not today ;-)

Michael

---

From: mld/uade team
Date: Mon Mar 19 13:08:40 2007

To: UADE-Developer-discussion
finally commited to cvs now. have fun :-)

---

From: Melkor
Date: Thu Mar 22 09:51:46 2007

Well my friend, there's something wrong somewhere... It produces the same result as my previous post. uade123 plays nicely everything I throw at it but no file is recognised/played by audacious-uade...

I'm SURE I'm using correct version of both audacious 1.3.1 and uade 2.05.20070319. See my post here explaining how I enforce version control on  uade at compile time http://board.kohina.net/viewtopic.php?t=985#5370

Running &quot;audacious --no-log&quot; gives no useful information except that MAD plugin (default for MP3) tries to play the file and complains about it for obvious reasons. I tested with DeltaMusic2, Custom, FutureComposer, etc... I even tried a file without spaces in the name thinking of a problem with audacious VFS but no luck.

I've diff-ed &quot;uade CVS 20070303 + Joker patch&quot; and &quot;uade CVS 20070319&quot; and except a define entry to keep audacious 1.2 API compatibility and variable renaming, they are the same. In some way this is logic to end up with the same results for both versions.

I tried to remove every other plugin (moving them out of /usr/lib/audacious/Input) except libmad. In this case, Audacious accepts to display files in the playlist (I D'n'D files from Konqueror to Audacious playlist) but does not play them. If I finally remove every plugin (including libmad), Audacious refuses to even display the file in playlist claiming &quot;Unable to play file&quot;.

So what's broken here ?  :(

---

From: Guest
Date: Thu Mar 22 12:48:27 2007

To: UADE-Developer-discussion
hmmh,,, weird... it does plays here on debian etch, audacious 1.3.1 without a hassle...

Hmmh, could you check the audacious preferences for --&gt; audio -&gt; detect file formats by contents?

---

From: mld/uade team
Date: Thu Mar 22 12:51:19 2007

To: UADE-Developer-discussion
that was me above... I can confirm now that libmad fileformat detection sucks :-)

You have to tick &quot;detect fileformats by contents&quot;

---

From: Melkor
Date: Thu Mar 22 21:31:05 2007

Hi mld,

I have no such option in Audacious 1.3.1, though I remember there was one in 1.2 series.

In &quot;Audacious Preferences -&gt; Audio -&gt; Format Detection&quot; I have :

- Detect file formats on demand, instead of immediately
- Detect file formats by extension

I confirm to be running Audacious 1.3.1 (20070310-4244), in the bottom left of preferences window.

Something's definitely wrong :)

---

From: mld/uade team
Date: Fri Mar 23 18:58:02 2007

To: UADE-Developer-discussion
oops sorry. I meant &quot;Detect file formats by extension&quot;, tick that one on. It should work then.

---

From: Melkor
Date: Fri Mar 23 21:46:20 2007

I forgot to mention in my post that I've, of course, tested the 4 possible combinations of these 2 options and nothing got it to work properly.

I've tested everything around this such as :

- Copying eagleplayer.conf to my ~/.uade2/eagleplayer.conf
- Removing directory ~/.uade2
- Verifying that all my files are corresponding to the &quot;prefixes&quot; syntax (either by prefixing and/or suffixing them)

Nothing worked so far!

This is really pissing me off now... I consider this to be a regression in Audacious. Everything worked nice with 1.2 series concerning file detection and now, there's no way for me to make libuade2.so work within Audacious.

I'm waiting to make all these things work to release a whole load of new packages to my repository and I'm fed up to wait. For now I can't release all these packages because something is really BROKEN between UADE and Audacious and I can't figure out what this is!

I trust you when you say it works but here it doesn't ! Is there any way to trace audacious/libuade2.so activity in order to see what audacious sends to libuade2 and what is libuade2 conclusion on the given filetype (accepted of refused)

Sorry for being on my nerves, this is nothing against you but I just hate when something goes wrong and I can't see where the problem is.

---

From: mld/uade team
Date: Sat Mar 24 12:30:08 2007

To: UADE-Developer-discussion
sorry it didn't work... As I saind I'm on Debian etch here, so things should be similar to ubuntu (at least edgy, afaik)

first of all move any plugin of the audacious plugin directory, compile uade2 and plugin and then just place libuade2 manually into it.

start auda, try if it plays e.g. Futurecomposer files and so on.

Then put libmodplug back in (disable amiga mod replaying in modplug!)

restart auda, try again...

go on like this and report for which other plugin it breaks amiga file replaying.

---

From: Joker
Date: Sat Mar 24 15:46:51 2007

To: UADE-Developer-discussion
[quote:92d14dd053="mld/uade team"]finally commited to cvs now. have fun :-)[/quote:92d14dd053]

I just built latest Audacious SVN and latest UADE CVS and it seems to work fine.

---

From: mld/uade team
Date: Sun Mar 25 10:26:56 2007

To: UADE-Developer-discussion
one thing I recognized with audacious (I won't call it a regesseion)... you have to reload (file open, load) a song to be played  with a different input plugin, I think that was different with 1.2.x

Michael

---

From: Melkor
Date: Wed Mar 28 16:13:51 2007

Well, I've tried everything possible and I start to believe that I'm really incompetent.

I've packaged UADE CVS 20070323 and tried again with same result. I tried hand compile (without debhelper surrounding stuff) and no success to. I've checkout-ed revision 4278 of Audacious (just before inclusion of libmowgli) with the same result. Finally, I've compiled UADE audacious plugin with DEBUG 1 (plugin.c).

I can't debug this, I have no feedback/logs from audacious itself, strace gives NO useful info on what is happening.

It just don't work with Audacious. XMMS works fine. Audacious keeps bullshiting me that Amiga files are not recognized, this is too much!

Every other plugin I have work flawlessly, EVERY ONE, except this one. I already explained in my post of 2007.03.22 10:51 that I already tried with all other plugins physically removed from /usr/lib/audacious/Input with no result.

I can't stand this kind of situation, this is a Windows-like behaviour (something &quot;understandable&quot; happening) and I can't accept that. So I want to know what's wrong!

I compile all projects with gcc 4.1.1 (gcc-4.1 4.1.1-13ubuntu5) which is the default compiler on Ubuntu Edgy (and I use a special chrooted environment to compile project with a default Ubuntu server install which is reset to default after each package build).

Debian Etch uses gcc 4.1.1 too (gcc-4.1.1 4.1.1-21) and I believe Joker is using Gentoo as he offers ebuilds on his site. Gentoo uses gcc 4.1.1 too (gcc 4.1.1-r3) so we're all using the same compiler but having different behaviours.

I've prepared a tarball containing audacious (along with needed files) and libuade2.so. These builds are extracted as-is right after compilation, thus they are not stripped. Could you please (MLD and Joker) backup you existing files and replace them with these for a test ? (if you are using a x86 system of course). I'd like to know if the files I compile work all the same with you.

In return, could one of you prepare the same kind of tarball and send me the binaries to test if yours are working fine here ?

You can find the tarball here http://morgoth.free.fr/AudaciousUADEMorgoth.tar.gz

and you can send me the tarball at [email-masked]

Thanks.

---

From: shd
Date: Thu Mar 29 10:48:18 2007

To: UADE-Developer-discussion
Have you looked at flie permissions on /usr/share/uade? Are the data files sane under $HOME/.uade2 ? Have tried fresh config files, i.e. rename old $HOME/.uade2 ?

---

From: mld/uade team
Date: Thu Mar 29 11:01:21 2007

To: UADE-Developer-discussion
you got mail. Your audacious is broken on my box (uade2, skin support, and playlist handling). Any special buildflags you have used?

---

From: Melkor
Date: Thu Mar 29 23:59:11 2007

To: UADE-Developer-discussion
[quote:9808fe74d0="shd"]Have you looked at flie permissions on /usr/share/uade? Are the data files sane under $HOME/.uade2 ? Have tried fresh config files, i.e. rename old $HOME/.uade2 ?[/quote:9808fe74d0]

$HOME/.uade2 was removed of course during all tests. BTW, uade123 runs perfectly fine here :)

As of /usr/share/uade the permissions are always good because they are enforced by the Debian packaging system before creating the deb file. This is the job of dh_fixperms debhelper tool. You have to explicitely name what files  should have different perms than the default ones from the FHS rules (chown -&gt; root.root and chmod -&gt; u=rw,go=r with x for directories of course)

Would be nice if was the problem :)

---

From: Melkor
Date: Fri Mar 30 00:32:44 2007

To: UADE-Developer-discussion
[quote:81a83d1cd7="mld/uade team"]you got mail. Your audacious is broken on my box (uade2, skin support, and playlist handling). Any special buildflags you have used?[/quote:81a83d1cd7]

Ouch... and... believe it or not, YOUR audacious behaves EXACTLY as mine on my box. Same symptoms, same results. I can't believe that... This is easy to check I didn't make a mistake. Your files are not stripped and thus much bigger than mine. They produce the SAME result! I even rebooted (shades of Windows...) but got the same behaviour after that.

As for build flags, the Debian packaging system enforces some common ./configure flags (--prefix, --mandir, etc...) and enforces CFLAGS to &quot;-Wall -g -O2&quot;. You have to EXPLICITELY override them in debian/rules file which is not the case here.

So, audacious is configured with : --disable-rpath, --enable-chardet and --enable-ipv6.

&quot;ipv6&quot; if for Debian policy compliance, chardet is &quot;character set detection support&quot; and rpath is &quot;hardcoded rpath&quot;.

uade is configured with : --package-prefix and --docdir

These are pretty harmless I hope :)

Here, Audacious autosaves the default playlist as expected. I don't have any alpha channel skin but I'll fetch some to test. We agree about no uade file being accepted, though :)

I can't fully guaranty that my desktop box is crystal clean because it's heavily customised (KDE 3.5.6, nVidia drivers, Beryl/Emerald, exotic packages, etc..) but I can guaranty that my build system is ! I use a Ubuntu server install I deployed in a old server. I tarballed all the files and untar-ed them twice in a dir on my box, one as a &quot;base&quot; and the other as a &quot;sandbox&quot;. I chroot [1] into the &quot;sandbox&quot; and I &quot;apt-get install&quot; all needed files/dependencies for the project I want to package. Once the package is done, I exit the &quot;sandbox&quot; and I rsync it with &quot;base&quot; to bring it back to its default state (I call this the VMWare/XEN of the poor :) ). So, for sure the build system is NOT corrupted by any custom or &quot;out the default install&quot; package.

[1] Well, this a bit more than a simple chroot as I &quot;mount --bind&quot; dev (udev), proc and sys to make it look like a real machine.

To test that my desktop box isn't broken, I'm going to test it a bit further by booting a Ubuntu LiveCD and manually copying my packages and the files from your tarball to see what's happening! I'll let you know.

PS: I doubt it makes any difference but I don't use the kernel package from the distribution but my own cook from vanilla kernel tarball for about 10 years now. Currently, I'm running 2.6.20

---

From: Melkor
Date: Fri Mar 30 02:27:58 2007

Hi guys,

I did the test with a Ubuntu LiveCD ! The conclusion is pretty simple now...

I'm gonna commit murder for sure... read on to know why!

So, I booted up the Ubuntu LiveCD (Edgy 6.10), mounted my hard drive to get access to my files and installed my packages, namely &quot;audacious&quot;, &quot;audacious-plugins&quot;, &quot;libmcs&quot; and &quot;audacious-uade-cvs&quot;. I opened up Nautilus and reached my test files which are :

BP - Allister Brimble - Alien breed.bp
CUST - Paul Van Der Valk - Imploder 3.cust
DM2 - Angels 3.dm2
DW - David Whittaker - Wrath of the demon.dw
FC13 - Jochen Hippel - Chambers of Shaolin.fc13
FRED - Jonathan Dunn - Robocop.fred
HIPC - Jochen Hippel - Prehistoric tale.hipc
MA - Rob Hubbard - Monty mole.ma
MED - Teijo Kinnunen - Starkelsesirap.med

I threw them to Audacious which fiercely refused them with its usual &quot;Unable to play files&quot;. Then I unpacked the tarball MLD sent to me and backuped/replaced the files. This lead to the same results.

On my desktop, I use a LOT drag'n'drop. When I launch Audacious, the playlist is also opened. I have my file manager (Krusader for instance but Konqueror and/or Nautilus is all the same) and when I want to listen to music, I select files and D'n'D them directly on the playlist. I do that for years and never did another way except a long time ago when D'n'D didn't worked between applications.

So, with the LiveCD I did the same D'n'D ! Then... I did something I never did before and everything started to work.. amazing!

I used the button &quot;Add -&gt; Add files...&quot; from playlist (shortcut 'F'), selected the very same test files and they played nicely... I did a D'n'D again but &quot;Unable to play files&quot; came back! Gosh... I was astonished!

I rebooted to get back to my usual desktop, replaced back the files from my packages and fired up Audacious. D'n'D files and got the error as expected. By loading them through Audacious file selector, everything works perfectly !

So, who should I kill/murder/erase/blow/explode/nuke for having driven me mad for 2 weeks ? ;)

Then I'll commit suicide for being stupid in assuming that D'n'D caused the same behaviour as loading through file selector  :cry:

Who's to blame ? Audacious or libuade2 ?

---

From: Melkor
Date: Fri Mar 30 10:54:25 2007

As the board is back online, I continue here :

[quote:fb005f0133="shd"]I was going to email you that audacious 1.3 plugin is a hack, which was not implemented by us. I don't recall specifics, but I think audacious 1.3 uses a new URL scheme for songs which uade does not handle.[/quote:fb005f0133]

Yes. In 1.2 branch they used GnomeVFS but dropped it. They're now using their own VFS implementation.

I had to deal with it because of audacious-mac plugin which is a simple front-end. It passes all info to libmac2 to do the actual decoding. A first packaging I made lead to get in playlist :

Invalid MAC file 'file:///path/to/file.ape'

I reported to Joker and he pointed out the VFS naming scheme which was not supported by libmac itself. Joker wasn't very motivated on fixing the problem because he hardly uses APE files so I made a small patch which stripped 'file://' from filename before sending fileinfo to libmac2 and it works as expected (both DnD and AddFiles) eventhough it does not support any accented character in filename (it would be URL encoded by Audacious VFS) nor spaces (in fact, it supports spaces in filenames for the first use but when Audacious autosaves playlist on exit, spaces are converted to %20 and then it won't work).

[quote:fb005f0133="shd"] Could you please put &quot;verbose&quot; directive to uade.conf and tell what happens on the command line (start audacious from command line)? Then play files with DND and add files. You will probably some info about the failure.

I should have asked for a verbose mode dump earlier.[/quote:fb005f0133]

shd, you're the man! ...and I feel stupid for not having though about making uade verbose in the first place when I was struggling with this issue.

It gives a very useful information. When I DnD a file, nothing gets printed to the shell console.
But, when using AddFiles, it says :

(first time libuade2.so is initialised)
/path/to/CUST - Paranoimia.cust: deduced extension: CUST
Loaded eagleplayer.conf: /usr/share/uade2/eagleplayer.conf
/path/to/CUST - Paranoimia.cust: deduced extension: CUST
/path/to/CUST - Paranoimia.cust: deduced extension: CUST

(and for all other added files)
/path/to/DM2 - Last flight.dm2: deduced extension: DM2
/path/to/DM2 - Last flight.dm2: deduced extension: DM2
/path/to/DM2 - Last flight.dm2: deduced extension: DM2

/path/to/FC13 - Jochen Hippel - Shaolin agility.fc13: deduced extension: FC13
/path/to/FC13 - Jochen Hippel - Shaolin agility.fc13: deduced extension: FC13
/path/to/FC13 - Jochen Hippel - Shaolin agility.fc13: deduced extension: FC13

/path/to/FRED - Jonathan Dunn - Robocop.fred: deduced extension: FRED
/path/to/FRED - Jonathan Dunn - Robocop.fred: deduced extension: FRED
/path/to/FRED - Jonathan Dunn - Robocop.fred: deduced extension: FRED

/path/to/HIP - Jochen Hippel - Leavin' Teramis 3.hip: deduced extension: SOG
/path/to/HIP - Jochen Hippel - Leavin' Teramis 3.hip: deduced extension: SOG
/path/to/HIP - Jochen Hippel - Leavin' Teramis 3.hip: deduced extension: SOG

etc... If you PLAY the playlist entry, you get an extra line of the same kind.

What I find useful is the difference between DnD and AddFiles. It seems that when using DnD, the uade plugin is not &quot;called&quot; or initialised as if it was not present. When using AddFiles though, it gets called as expected.

Maybe a missing entry in &quot;InputPlugin uade_ip&quot; declaration?

---

From: mld/uade team
Date: Sat Mar 31 10:03:42 2007

To: UADE-Developer-discussion
hmmh, we could strip file:// prefixes in the uade plugin as well, if that's the problem...

---

From: Melkor
Date: Sat Mar 31 12:08:36 2007

Well, I think it's not that simple in fact. The small patch I wrote (a single dumb function called at 2 places) made the MAC plugin work everywhere, I mean AddFiles as well as DnD. The file:// prefix seems not to be a problem currently as AddFiles method is working just fine whithout any glitch.

libuade2 seems to react differently between AddFiles and DnD and this is the heart of the problem.

Is audacious ignoring libuade2 when asking each plugin if the file is supported?

Is libuade2 not initialised (maybe an entry missin in InputPlugin uade_ip structure) by Audacious and thus not asked it handles the DnD'ed file?

Is there anything else somewhere that prevent libuade2 and audacious to communicate specifically when DnD files are dropped on Audacious Main/Playlist window?

PS to MLD : I tested the skins you sent me by mail and NONE of them causes the slightest problem... &quot;audacious_default&quot; does not use alpha channel as fas as I can see and &quot;audacious_compact/mini&quot; work perfectly with their very minimal and fully transparent interface. At least, I don't see any kind of problem here, I can send you screenshots if you like.

---

From: mld/uade team
Date: Sun Apr 1 09:42:47 2007

To: UADE-Developer-discussion
about the dnd problem... Could you test if dnd behaves differently with Main Window and Playlist window. I don't recall it for sure, but I think once there was a problem where dnd main window worked and playlist  didn't, or vice versa.

hmmh, there's an vfs extension field now in the ip struct of audacious, maybe this is to blame, we don't use it., but maybe it has to be used.

About the skin, that's odd, but good news :-) I guess I better send a screeny where it's broken. My best guess is, different gfx lib versions or something between your up to date edgy and my stock install.

---

From: Melkor
Date: Mon Apr 2 12:35:39 2007

I've quickly tested DnD for main and playlist windows and they behave all the same. No noticeable difference between them.

As of the skins, I'll test with the LiveCD for a stock install. I have a FX500 nVidia card and thus I use the nVidia proprietary drivers (I hope the &quot;Nouveau&quot; project will soon become mature :) ).