Author Topic: XMPlay remote control - proof of concept (WIP)  (Read 484 times)

pilau

  • Posts: 16
Hi everyone. I wanted to share with you my latest work.

In this video you can see me starting, pausing and resuming the playback in XMPlay from a separate computer.

https://www.youtube.com/watch?v=jyEFhy8fH54

This is something I have wanted to do for a long time. The ultimate goal, eventually, is to have an Android app that would control XMPlay with a nice user interface.

In the future, I plan to also add the ability to open and queue tracks via the app, which would be exciting!

zikey

  • Guest
Re: XMPlay remote control - proof of concept (WIP)
« Reply #1 on: 25 Nov '16 - 12:34 »
looks cool  ;D keep up the nice work

Ian @ un4seen

  • Administrator
  • Posts: 19922
Re: XMPlay remote control - proof of concept (WIP)
« Reply #2 on: 25 Nov '16 - 17:08 »
Here's an old plugin that has the beginnings of a remote control plugin, which you may find useful for your plugin (source is included):

   www.un4seen.com/forum/?topic=9462

These posts may also be relevant/useful to you:

   www.un4seen.com/forum/?topic=16447
   www.un4seen.com/forum/?topic=12417

pilau

  • Posts: 16
Re: XMPlay remote control - proof of concept (WIP)
« Reply #3 on: 8 Dec '16 - 00:03 »
Thanks Ian! I missed your reply, although I had checked out that C++ code before.

I had made a lot of progress in my project, but actually, I'm having a bit of a hard time converting this line of code into C#:

Code: [Select]
SendMessageTimeoutW(XMPlayHWND, WM_USER, i, 212/*IPC_GETPLAYLISTTITLE*/, SMTO_ABORTIFHUNG, 300, (LPDWORD)&pcu8Title) || !pcu8Title) return;

Basically, I can invoke the API in my program and I'm getting the DWORD pointer back, but I don't know how to convert it to a String title. Do you have an idea? Cheers

Ian @ un4seen

  • Administrator
  • Posts: 19922
Re: XMPlay remote control - proof of concept (WIP)
« Reply #4 on: 8 Dec '16 - 13:33 »
I'm not a .Net user myself, so I'm afraid I'm not familiar with how it would be done there. IPC_GETPLAYLISTTITLE is a Winamp message, so you could try searching the 'net for any references to using that message in .Net with Winamp, and then apply the same to your plugin.

pilau

  • Posts: 16
Re: XMPlay remote control - proof of concept (WIP)
« Reply #5 on: 13 Dec '16 - 15:51 »
Thanks Ian, that really helped. I additionally found a couple of examples to plagiarize:

https://getwinamp.com/wacup/sdk/Winamp/wa_ipc.h
https://sourceforge.net/p/wacc/code/HEAD/tree/WACC/clsWACC.vb
http://forums.winamp.com/showthread.php?threadid=180297

I have an additional question for you: Does DDE support retrieving Unicode track information? I am getting gibberish for foreign languages displayed correctly in the player itself.
« Last Edit: 13 Dec '16 - 16:04 by pilau »

Ian @ un4seen

  • Administrator
  • Posts: 19922
Re: XMPlay remote control - proof of concept (WIP)
« Reply #6 on: 13 Dec '16 - 16:17 »
Yes, Unicode track information should be fine via DDE, but it will be in UTF-8 form. So you would need to convert it to UTF-16 form, if that is how you want it (probably is).

pilau

  • Posts: 16
Re: XMPlay remote control - proof of concept (WIP)
« Reply #7 on: 13 Dec '16 - 16:23 »
You are right, it appears to be that the environment I'm developing in (nodejs) is UTF-16 by standard:

http://stackoverflow.com/a/11141331/1049693

That means I will need to add another conversion to the data retrieved from DDE before using it. Also the same regarding IPC results probably