Author Topic: XMPlay SDK available?  (Read 4921 times)

AlexanderGross

  • Guest
XMPlay SDK available?
« on: 12 Nov '07 - 09:41 »
Hi all,

I am looking for a XMPlay SDK, specifically I'm interested in the Window Messages that XMPlay supports.

Background: I have written a Windows Live Writer Plugin called NowPlaying, see http://therighstuff.de/Projects/NowPlaying/, that allows to embed the currently playing song in blogs posts. A user asked me if there is a chance that I will support XMPlay in NowPlaying because it's his preferred music player. (I've already got support for Winamp, Media Player, iTunes and MediaMonkey.)

Is there any public docs on how to retrieve the current track's media info (ID3) from outside of XMPlay? Winamp has the IPC_GET_EXTENDED_FILE_INFO message that works pretty well. Do you support a similar API?

Thanks,

Alex

Jace

  • Posts: 825
Re: XMPlay SDK available?
« Reply #1 on: 12 Nov '07 - 10:50 »
Yep. Through DDE. Link: http://support.xmplay.com/article.php?id=17
You'd be most interesting on the Info part.

Oh yeah, you can also just grab the window title (Caption on window class "XMPLAY-MAIN").

Aux

  • Posts: 91
Re: XMPlay SDK available?
« Reply #2 on: 13 Nov '07 - 10:43 »
You can also download xmp-scrobbler source code and see what's in - we are using WM_GETTEXT.

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: XMPlay SDK available?
« Reply #3 on: 14 Nov '07 - 14:18 »
Is there any public docs on how to retrieve the current track's media info (ID3) from outside of XMPlay? Winamp has the IPC_GET_EXTENDED_FILE_INFO message that works pretty well. Do you support a similar API?

XMPlay does support some Winamp messages, but unfortunately not that particular one.

As mentioned, you can get the tags/etc from XMPlay via DDE, but if you're developing a plugin (rather than an external app), a more convenient way is to use the XMPlay plugin APIs. See the "MSN now playing" plugin for a little example (source is included), and also the xmp-scrobbler plugin for a more complex one. Note from those examples that XMPlay doesn't have a "general" plugin system, rather the DSP plugin system doubles up as one.

AlexanderGross

  • Guest
Re: XMPlay SDK available?
« Reply #4 on: 17 Nov '07 - 13:16 »
Thanks for the information. As I'm developing an external .NET app and DDE isn't supported I will try to use the window messages to get the current track's info. The xmp-scrobbler plugin does provide a good start.

AlexanderGross

  • Guest
Re: XMPlay SDK available?
« Reply #5 on: 17 Nov '07 - 15:16 »
After some tests it appears to me as if it is not possible to query the current track info from outside of XMPlay. The scrobbler plugin does use the internal function GetInfoText() to get the track's tag information (WM_GETTEXT is only used to retrieve the plugin's setting values from the UI).

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: XMPlay SDK available?
« Reply #6 on: 18 Nov '07 - 17:02 »
Thanks for the information. As I'm developing an external .NET app...

If you're creating an external app (not a plugin), how are you using the IPC_GET_EXTENDED_FILE_INFO message with Winamp? I don't think that message can be used outside of Winamp, like the XMPlay APIs can't be used outside of XMPlay.

AlexanderGross

  • Guest
Re: XMPlay SDK available?
« Reply #7 on: 19 Nov '07 - 12:50 »
Actually, it's possible to send the message to the Winamp window. The complicated part is that Winamp stores the resulting information in its own process address space, but you can perfectly inject a block of memory using the AllocateProcessMemory and FreeProcessMemory APIs. Then, send the message to Winamp passing a pointer to the previously allocated memory block to store the track info. After that, read the memory block and, of course, free it. I can send you the .NET code if you like.

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: XMPlay SDK available?
« Reply #8 on: 19 Nov '07 - 16:31 »
Ah, I guess you mean VirtualAllocEx/ReadProcessMemory/etc? Clever :)

I don't know if it's sufficient for your purposes, but XMPlay does support IPC_GETPLAYLISTFILE and IPC_GETPLAYLISTTITLE, which you could use in the same sort of way.