foobar Web Service Server and Windows Mobile HD2 Client

After connecting my Hi-Fi system to my home server using an USB DA Converter (HRT Music Streamer II+) I needed a remote control solution for the foobar2000 music player that run on Windows Mobile (for my home automation system I use a bunch of HTC HD2 as remote terminals). Unfortunately, I did not found anything that I liked.

As I had some spare time I decided to develop a solution myself building a web service server based on the foo_comserver2 foobar plugin and a Windows Mobile client that access the server over Wi-Fi. They offer:
- basic playback control (play, stop, pause, next, previous)
- playlists listing and selecting
- selected playlist track listing
- media library access as a author/album/track tree
- media library search
- filling a playlist with albums or tracks from the media library

The client supports touch scrolling and (optionally) rotation.

As I developed them and they works at my home I post them here. Note that they are not commercial grade software (no installer, no configuration utility, the client is fairly dependent on HTC HD2 hardware) but
- the HTC HD2 is fairly common and the client might run on similar WVGA devices
- the server is more general and many tools can develop applications that interface to a web service
- full source code is included

Good luck!


Server requirements

- .NET framework V3.5
- foobar2000 V1.1.5 (or later) with these plugins
  - foo_comserver2 V0.7
  - foo_runcmd V1.1
  - foo_playlist_attributes V0.3.0

Server installation

- In foobar2000
  - Using foo_runcmd options under foobar preferences (advanced\tools\run command window) set search mode to words (at any rate is the default).
- Copy foobarWCFServer.exe, foobarWCFServer.xml, Interop.Foobar2000.dll and Interop.Foobar2000Helper.dll into a directory on your PC.
- If your temperary directory is not C:\temp edit foobarWCFServer.xml and modify PlaylistFillWorkPath accordingly.
- If your PC has a firewall enable port 8005 for external TCP access.
- The IP address of your PC must be fixed, if necessary do the necessary settings modification and annotate the IP address.
- Run foobarWCFServer.exe


Client requirements

- .NET compact framework 3.5
- HTC HD2 (or something very similar)
- optionally (required for rotation support) TouchLockPro 2.12.8 with GSensor enabled (http://forum.xda-developers.com/showthread.php?t=444215).

Client installation

- Copy foobarWCFClient.mobile.exe, foobarWCFSMB.dll, Microsoft.WindowsMobile.Gestures.dll, foobarWCFClient.mobile.xml and Click.wav into a directory on your HD2.
- Edit foobarWCFClient.mobile.xml and set HostLocalIPAddress to the IP address of your PC.
- Run foobarWCFClient.mobile.exe


Note on Playlist naming

The client can fill any playlist but ignores the ones that have names containing 'Stream' or 'Radio'.


Note on Media Library

In the chain of components (my server, comserver, foobar) there is something that does not understand 'strange' character in directory paths. Therefore, use only basic ASCII characters for the path of directories that contains music files and for music file names.

Example: for the Chick Corea & Gary Burton Zrich Concert album use a directory named "Zurich Concert", that is replace the fancy "".

On the other hand, the tags inside the music files can contains whatever you want.


Sources code

The archive contains the full source code of both server and client. They are coded in Oxygene / Delphi Prism (http://www.remobjects.com/oxygene).


USUAL LEGAL DISCLAIMER

Use this software at your own risk! NO WARRANTY! Although running these applications does not seem to produce any damage on my computers and phones, I take no responsibility for any kind of damage or major or minor inconvenience caused to devices or data or person or whatever else due to these applications and their usage.

The source code is offered free for any use, again at your own risk, but bashing the developer (to my excuse I jotted it down in a pair of days).