Up

Welcome to the AudioServer section of Chrutil's domain.

It all started in the fall of 1999 when a couple of friends and I were discussing where all this mp3 crap is actually going. After a few hours and some beer we came up with the idea for this server that hosts all the music and let you have instant access to everything. Well, after I got home I shamelessly stole all the ideas and started to implement what became the AudioServer. Version 1.0 was ready on September 18, 1999.
Enough with the history crap - here's a description of it. If you want to be mean, you can describe the AudioServer as yet another MP3 player for Windows. In reality, at least my reality, the AudioServer is a complete hardware/software solution for hosting all the music for my living room (and my office) on my computer. AudioServer can be described as a remote controlled music station with instant access to all tracks and the control panel displayed on the TV. 

Main panel. This is where you choose the action. Play an album or create/ playback a program (play list)   The "Play Album" or "Play Favorites" front screen. From left to right you have Artist, Album and Track.
 

AudioServer Hardware.

bulletDual Pentium III Xeon/550 with 1 GB RAM
bulletWindows 2000 Professional 
bullet200GB harddrive space (1x100GB, 1x60GB, 1x30GB and the system disc is a 9GB scsi).
bulletATI Xpert@Play graphics card 8mb (with TV out)
bulletIDE DVD-ROM
bulletNEC MultiSync 21" Monitor
bulletHome built InfraRed receiver to the serial port. Based on LIRC design. I also have an IRMan device and an AudioServer driver for it, but the LiRC has better feedback and tends to be a little faster if you have the cpu power to drive it (it taxes the cpu since it's polling the pins on the serial port)


AudioServer Software

bulletAudioServer executable 
bulletWinLIRC 0.6 IR server (by Jim Paris) 
bulletXAudio SDK mp3 decoder engine 
bulletMusicMatch 7 CD Ripper
bulletID3Lib by the team at http://www.id3.org/id3lib

AudioServer Design

AudioServer is a Win32 executable 'optimized' for Windows 2000. It was written in C++ using Visual C++ 6.0. It is not an MFC application - it uses only the Win32 SDK. The "Optimized for w2k" essentially means that I'm using alpha blending and some other API's that aren't supported on NT4 (and I don't have any NT4 machines around to test with anymore) so you're on your own there. Don't know about 9x/Me, but I see no reason it wouldn't work (as if it needed a reason not to work on 9x....). September 2002 Update - These days the AudioServer is compiled with Visual Studio.NET (VC7) as an unmanaged C++ application, and noone is running NT4 anymore, so ignore all the alphablend bull above.

Since the output is designed to be sent out to the TV, the AudioServer is best used as a full screen application. When used as a full screen application it removes the window borders, mouse cursor (unless you move the mouse) and all other evidence of being a Windows application.

At first startup, all the *.mp3 files in the configured loading directories are located and scanned for ID3 Tags to extract album, artist, track etc. If there are no ID3 Tags, the filename is parsed to extract artist, album track number and track. MusicMatch, the CD rippers I use, creates the filenames for the mp3 files using the format: "artist - album - track# - trackname.mp3" so an internal database is created at startup containing all artists, albums and tracks.

After the initial scan, the database structure and file information is written out to a cache file because scanning all these files on startup was okay in the beginning, but once I got a couple of thousand tracks in there, it ended up taking several minutes starting the server. The cached file contains all the information loaded from the ID3 tags as well as filename and timestamp. After startup a sync routine compares the file structure with the cache and removes files that aren't found on the drive and adds files that aren't found in the cache. There is also a directory monitor service that initializes a database synchronization as soon as anything changes in the directories that files are loaded from. This scheme changed the startup time from several minutes to a couple of seconds. And with the directory monitor I never have to exit the app or manually rescan the directories - as soon as an mp3 file appears on the hard drive it is added to the database.

AudioServer takes input from the WinLIRC remote control server over the tcp/ip port. A DLL loaded by the AudioServer receives the tcp/ip commands and triggers the actions chosen. This DLL is written using a to-be-published AudioServer API so that the AudioServer application itself doesn't need to be involved in the specific remote control mechanism - you just write a tiny little trivial driver for it. At this time I have WinLiRC and IRMan drivers available.

The main UI contains three lists for artists, albums and tracks. Only one list is active at any one time. The artist list is the one to the left. When scrolling around in the artist view the album and track views are dynamically updated for each artist selected. Once an artist is selected (by pressing play on the remote), the album view becomes active (and the artist view is grayed out). After selecting an album, the track list becomes active and when a track is selected it starts playing and the UI transforms into the "playback view". Once a track is finished the next one on the same album is automatically played. You can also use the remote to skip and fast forward/reverse while playing. 

There is a ScreenSaver built-in to the AudioServer executable that currently blanks the screen if it is inactive for 10 minutes (playback does not count as inactive) any activity on the remote control re-activates the system.

AudioServer Setup

The system requirements of the AudioServer itself are low, but I have seen problems using Lirc (the Infra Red receiver software) on less than a Pentium II/300. I am running it on a dual 266 Pentium II and it's okay, but I can clearly see the difference compared to running it on my main dual Pentium III Xeon/550 workstation. Since I now have a dedicated machine, the AudioServer is constantly running, and the TV output is always active together with the monitor so the system is always available form the living room theater or in my office where the machine is located. The soundcard is hooked up to my main stereo and I have my remote control receiver plugged in too.

Since my computer is located in my office, and the Audio/Video system in the main living room I have some cables going through the wall. I have an 25' (8 meter) Audio/Video cable and a telephone cable running through the wall. The telephone cable is used together with RS232 - RJ45 converters to connect the serial remote receiver to the computer.

Result

The result is that as of this writing I have 1500 CD's online for instant access on my audio/video system. That's over 18000 tracks, nearly three months of continuous playback without repetition. So how come there is never anything to listen to? Beats me.

In a little while the AudioServer software will be available for download here. Before that happens, please contact me directly if you want to try it out or chat about it.

Update December 2000 - Disaster Strikes the AudioServer

The end of the year 2000 was not a good time for the AudioServer. The scan converter I used to get TV output from my monitor (TView Gold) burned - I guess it wasn't designed to be running 24/7 after all. I actually asked TView technical support about this in mid 2000, but I didn't get an answer so I assumed it was a stupid question and of course it would work. Well, it didn't.

Much worse than a piece of failing hardware was a ... nother piece of failing hardware.. Namely a total failure of my main hard drive - the new 60 GB Maxtor drive. One day it started to behave strange as I was copying some files around. It never came back online. The whole thing was dead as a dodo and as it leapt into oblivion it decided to move about 6000 mp3 files to the NULL device. I was wiped clean. Serves me right not to have a backup, but the only practical way I can back this shit up is to by yet another hard drive.

I'm pissed that my hard drive failed, but Maxtor sent me a new one in less than a week so I can't really puke on them.

Anyway, I've got a nice little network setup here in my office so I decided to move the AudioServer from Hellraiser (the dual P3 Xeon/550) to it's own dedicated machine, called AudioServer amazingly enough). AudioServer is my trusty old Intel DK440LX based Dual PII/266 machine .It has an old ATI xpert@play graphics card with TV out so I don't need the scan converter anymore. This machine is now running on its own 21" single monitor with a 30GB and a 60 GB hard drive and 384 MB RAM. A recent addition of a 100 GB drive (total's 200GB now) makes this a nice machine for a stand alone music server.

So the music was gone. Just for the hell of it I decided that now that I have to rip everything again I'm going to do it right. First of all I'm ripping the whole collection in 160 kpbs. It takes a little bit more space than the previous 128k, but it starts to get close to CD quality and the size of the whole data base is still manageable. Even though 128k was okay, I always felt that it kind of sucks to have a 'high-end' stereo (okay, consumer high end - I don't have Krell gear quite yet) and then use it to play back sub optimal source material. Ripping at 160 is still about three to four light years away from SACD quality, but it's an okay compromise between lazy bum and audiophile. Great for casual listening if nothing else. I am also using another ripper - MusicMatch 6.1 instead of Real Jukebox. The sole reason for switching is that MusicMatch uses ID3 tags version 2.0, while Real Jukebox uses version 1.0 of these tags. Big deal, you say, but in ID3 tags v1, the artist, album and track names have a 30 character limit so lots of stuff is truncated. And that's no good.

MusicMatch is a slight curse because once every now and then (perhaps about 10-25% of the times I rip) it either bluescreens my machine inserting a CD, or it hangs while 'adding track to database' - and when MusicMatch hangs you can't kill it. Sure, the window disappears, but the process just says there saying 'Access denied' when you try to kill it. I don't know what they are doing, but it aint nice and since I'm ripping simultaneously on three machines here I reboot a machine every hour - and it is starting to drive me nuts. I'll be done soon though, I'm averaging 75 cd's a day or more so it's okay. I actually just figured out what caused MusicMatch to suck - SMP - dual processor machines doesn't make MusicMatch happy. Once I realized that I tried setting the affinity of mmdiag.exe and mmjb.exe to only run on CPU 0 and now it hasn't crashed in a long while! (not counting those times where I forget to go into the control panel and set the affinity of the process after it is started). Haven't seen this with 7.0 yet, but that doesn't mean it's not there anymore...