Development Update

Topics: Developer Forum, User Forum
Coordinator
May 2, 2007 at 1:07 PM
So, there's been no activity visible here for a while. What happened?

A couple of things: the first was the start of work to implement playing internet radio streams. This started off well: the player implementation has changed in a big way, with stream provider and transmitter interfaces allowing multiple sources and targets to talk to each other. This meant you could pull out a file source and replace it with an internet radio source (or any other kind of source) really easily. It also mean that I had a unified way of presenting a stream to players, which made life much easier.

Except that it didn't for the PC Client, which wanted to know how big the stream would be. The issue was the underlying FMOD sound library (or, in fairness, my ability to manipulate it). I spent 2 weeks trying (and failing to do this). I then tried several other mechanisms, all of which failed. DirectSound didn't work because services and DirectSound don't like each other.

Finally, after several weeks, I've got an implementation that stays true to my initial interface-based implementation and can handle network streams. I've tested it and I'm happy it works as a service but still need to ensure that it will work when the PC is logged off.

So, expect a minor release with the new interface-driven mechanism in the next 2 weeks and internet radio another month or so down the line. I'll also try to release more smaller versions to keep the features and fixes coming.
Coordinator
Jun 30, 2007 at 3:39 PM
Now end of June and no release (I did promise one last time - appologies). Here's what's been happening:

Sorting out threading issues. There were several situations where threads would carry on when they should have stopped (made for some interesting playback). this has been fixed
Lots of refactoring to make the code cleaner.
More error checking
Re-write of the MP3 loader classes (a fresh load of 4000 mp3s takes 90 seconds - down from 4 minutes).
Use of XSLT to improve search perfromance and simplify code

What's left?

Final retest of the exstreamer element to make sure the changes to threading haven't affected it
More testing (running at home in a "semi-live" environment to see how it copes on distributed hardware)

I'm not doing any more re-factoring from this point on as I want to actually release something. Once I've released I'll branch so that code is split into "new features" and bug-fixes (release branch) to improve stability of the released build.

Coordinator
Jul 5, 2007 at 12:34 AM
Edited Sep 6, 2007 at 6:57 PM
Good morning...

Insomnia is a great thing. So, what's been happening?

Well, the PC client software is almost ready. There are 2 more bugs remaining:
  • Volume control doesn't hold settings between sessions
  • You get a stutter when pausing/forwarding tracks.

The PDA client software is ready (I'll regret saying this, I'm sure) with the added bonus that it now also re-sizes correctly for sub-VGA and VGA PDAs (tested on a Dell Axim v50).

Server software threading issues are sorted. The final test is the exstreamer stuff (for the 3 people out there who own ExStreamers) to make sure that my threading changes haven't caused any problems. I can only do this at home - this is where the exStreamers live - so it's a case of finding an hour or so to test when I won't annoy people.

Expect an alpa release on the weekend and a beta release a week or two later when I've found more bugs at home.
Coordinator
Jul 5, 2007 at 10:00 PM
Productive day today:

Exstreamer testing going well. ExStreamer works except for pause (sometimes loses positioning - not sure why as this is held at class level).

PC Client stutter is gone - it's got a nice crisp start and stop.

Volume is not being saved back to the configuration class when a new value is entered. Hoping to put a temporary fix in tomorrow with the aim of making the whole configuration class structure serializable later.

Checked in a whole bunch of code today - this covers all changes and fixes to date.
Coordinator
Jul 6, 2007 at 10:51 PM
Things fixed today:

  • Volume control now holds between sessions and holds once app is shut down and started again, so configuration classes are now doing what they're supposed to.
  • Fixed a boundery condition bug on the increment/decrement volume buttons on the PDA controller
  • Fixed a bug that caused previous and next commands to occaisonally stop and not play next/previous track

There are, of course everal issues remaining:

  • The copy and move queue commands on the PDA Controller still don't work.
  • Pausing and re-starting an exStreamer twice in a row quickly causes the track to stop rather than pause.

But these aren't show stoppers and the PCClient is behaving in a much more reliable fashion so I'm going to release tomorrow. Once finished writing what seems to be a daily post I'll create a new planned release, then the 3 of you who read this can download and tell me what doesn't work.
Coordinator
Jul 8, 2007 at 6:54 PM
Release day. Should have been yesterday but a work-related thing got in the way - a truly awful 3rd party piece of software required a data load.

Anyway - a few last minute bugs were fixed before release, including:

  • PDA controller unable to change the name of a player (default naming is by ip address)
  • An error in the TCP binary sending classes was occuring on my home network when a track finished - probably a latency thing that I didn't experience when running everything off one PC

A couple of outstanding issues out there:

  • the exstreamer seems to cut a track short by about 1 second. I think this is happening because the connection is being closed to the device when the app finishes streaming to the exstreamer and the exstreamer stops playing when it loses a connection. I'm going to look at this this week.
  • both the bugs, above, are still issues.

Again, none of these are show stoppers (and I doubt there are that many exstreamer owners out there, shame as they're cheap and reliable) so I've released with the aim of patching these bugs this week.

So, enjoy. If there are any issues please let me know (at the very least it will confirm that someone actually read this).
Coordinator
Jul 10, 2007 at 11:55 AM
Well release went out and 3 people downloaded it (that'll be the three of you that actually read these blurbs).

I've been working on some of the issues mentioned above:

  • The copy and move playlist stuff now works. I'm currently tidying this up
  • The Exstreamer stop functionality that was cutting off the last couple of KB of the song has been sorted and just needs some testing

I haven't looked at the other exstreamer issue yet (ExStreamer stuff is harder to do as I need to test at home on physical hardware).

I'll release these fixes at the end of the week along with anything else I find along the way. Once I've done that I'll branch and start working on internet radio.
Coordinator
Jul 12, 2007 at 3:30 PM
Hi folks,

Last couple of days have been a bit more quiet but have managed to make a number of changes to make the PDA app a little more friendly.

The big change is to provide status as the PDA searches for the music server, flipping from "Not Connected" to "Searching" to providing a list of players.
I've also disabled all the context menus until the music server is picked up..

Also finished the move and copy playlist functionality. This was just a PDA thing, but it now works as expected (copies/moves all tracks and then changes to the player that the move./copy was directed at).

So, what's next? I've got a couple of issues that are a bit nebulous that need chasing:

  • the PC Client occaisonally gets very choppy. I think this happens when the PC is over-taxes but it needs more investigation. I need to isolate this before I can fix. The good news is a pause/play clears it so 1) it can be stopped and 2)it suggests a buffer issue so I have somewhere to start the investigation.

Once I've got this I'm going to start work on the internet radio side of things. I've already got a chunk of code for getting radio stations from Shoutcast - I need to integrate it in and build a "RadioSource" music source class. Timescales? Will try and say soon.
Coordinator
Jul 14, 2007 at 4:07 PM
Hi folks,

Expect another release of Emp3thy tomorrow.

This is a "patch" release that fixes a number of bugs I've found over the week and a covers a couple of fixes I've previously promised (see above). These include:

  • Move and copy playlists is now working
  • The PDA controller provides an indication of what it's doing when it first starts - moving from "Not connected" to "Searching" to a list of players.
  • Exstreamer streaming stops about .5 seconds too early (will be testing tomorrow!)
  • Unexpected exception handling now added
  • Some minor improvements to monitoring (there is an internal monitoring app for showing the traffic between devices - it's still flaky but it is useful).

This will be released as 906a - expect int out noon UK time on Sunday.

With this out I'm going to turn my attention to getting internet radio working (and fixing bugs I find on the way). I'll branch the code tomorrow to allow "bug-fix" versions to be released along-side "new-feature" releases.
Coordinator
Jul 21, 2007 at 5:27 PM
A week of no posts, so what's been happening?

The first half of he week was about putting some monitoring functionality into the music server. This is a separate application (the Cheap'N Cheerful monitor) which displays:

  • All network messages sent to and from the music server
  • Any error or log messages generated
  • All actions occuring due to incoming messages.

This is now working and stable. The music server only sends to a monitor if one has registered with it and its app.config is set to do so. If it tries to talk to its registered monitor and it doesn't accept the call it simply stops talking to the monitor.

The second part of the week is extending the scope of the unit tests, which is currently at a meagre 35% code coverage. My aim is to get this to 50-60% so I've got a steady base to work with.

Oops - time to take my daughter swimming - more later...
Coordinator
Aug 4, 2007 at 10:01 PM
Long time no post, so what's been happening?

Well, been writing unit-tests (41% coverage - low but 10% better than 2 weeks ago). Aim is to get it to 50% in the next 2 weeks. Writing the tests have exposed several bugs so it's been useful.

The really good news is that I've been working on internet radio for the past week - I've been on holiday so have been able to grab a bit of time to code this in and it is mostly there - the guts of it work and the integration of the radio functionality with the rest of the music server is done - the last thing to do is to write the extensions to the PDA player to handle the extra search functionality (search by radio genre and by station name).

I've got the morning free tomorrow so I'm hoping to get that element coded. It'll be a bit rough but it'll work - I'll need to figure out how far I want to go in terms of reading and displaying shoutcast metadata (I currently strip it out and ignore it) but that would involve lots of work and the code for the PDA is terrible (anyone want to redo it? Help gratefully received!).

So, expect a release in the next 2-3 weeks - I'm on holiday again end of Aug (us lucky Europeans and our 4-6 weeks holidays) but I don't think I'll have the opportunity to do much coding then. If in doubt about it I'll delay.
Coordinator
Aug 12, 2007 at 8:11 PM
Last week has been a good one in terms of functionality. Here goes:

Internet radio is wired in and working. Stations can be selected by Genre or by Station name and then added to a queue. A Station will play until stopped and a station can be paused and resumed.

Radio and music xml formats have changed and this has been wired into the player so that incompatible formats are detected and libraries rebuilt automatically.

Changes for this week:

provide a "Rebuild" button for the radio and provide the user with the ability to filter radio stations out from the library rebuild by bandwidth and # of listeners.

Next step is to test from a "year zero" perspective. Clean out my configs and install.
Coordinator
Aug 15, 2007 at 11:20 AM
Hi folks,

"Year Zero" testing has completed successfully. This weekend I'll do some end to end testing and then, if no big issues are found, I'll release. So far radio playing is working fine. I've just built in a filter to the radio station spider that lets you set the minimum bit rate and listeners requirements. This gets rid of stations that aren't of a minimum quality or are only "sometimes" on the air. There is something like 2500 stations out there so I thought this might be useful.

I'm also going to be putting an upper limit on the buffer for the radio. I'm going to leave it at about 12 minutes before it starts dropping packets because otherwise the system has to continue to load radio packets without disposing of them. there are several options with dealing with this, including writing it to file and then loading it back into memory when it starts up again, but I'm then making an open-ended commitment to keep on writing a file. If you pause a radio station and then forget about it you'll soon find yourself with a very large MP3 file sitting on your disk.

Coordinator
Aug 16, 2007 at 9:07 PM
Code is checked in. Tomorrow I'll deploy in a "real" environment and test. The test will involve purging all configuration files so the system installs and runs on a completely clean environment; the server will then build its configs back up from scratch.
Coordinator
Aug 29, 2007 at 7:15 PM
Hi folks,

A couple of further checkins:

A whole bunch of tests. Code coverage is now at 51% (I wanted to hit 50% for this release).
A couple of bug fixes based on results of the unit tests

Last thing before release: I'm putting a quick tool together for XP SP2 and Vista users that allows you to configure turn off ports on Windows Firewall (no, not a hack, it uses the Windows Firewall API). This tool will allow Joe Public to test their firewall config and, where incorrect, get the app to fix it automatically. The main firewall class is built and tested, so I just have to write the basic client front-end. This will take a couple of days.

Once this is done I'll release, so sexpect a release at the end of the week (probably sunday).

Oh, the testing in the "real" environment - my house - went off with only one glitch, namely that exstreamer pause actually stops rather than pausing. I'm going to look at that once I've published with a view to fixing it as soon as possible.
Coordinator
Sep 6, 2007 at 6:30 PM
Two releases in as many days - all the issues I've had I've had on windows 2003 server so their effects shouldn't annoy too many people. There are still a couple of outstanding issues that I'm going to try and fix in the next couple of days:

  • The radio station URL list becomes stale after a couple of weeks. I'll need to build in an updating mechanism to cope with this (probably on a separate thread so that nobody notices that it's happening).
  • The ExStreamer class currently treats a pause as a stop.

I've got a further outstanding fix (fixed locally but not checked in) for the mechanism that sends music to the PC Client. On a 2003 Server PC it was unable to stream radio consistently (one of the transport objects was causing issues). This is fixed but not part of the .907 family of releases - I didn't think releasing again for this was worthwhile (let me know if you disagree).

After that, it's all pretty shiny. Everything looks to be working as expected.

I'm currently torn between a couple of development paths:

  1. Creating client for PDA
  2. Creating a PC Client Controller
  3. Creating a Controller that is an MCE plug in
  4. Creating a remote player (one that runs in a WAN type environment - for work, etc) and controller

I'll let you know which way I'm going shortly.
Coordinator
Sep 23, 2007 at 9:38 AM
Hi folks,

I'll be posting 0.907b shortly. This contains two fixes:
  • ExStreamer pause (and some other very strange behaviour) is now completely fixed.
  • Radio library should refresh itself roughly once a day to make sure that station URLs never go "stale".

I've been thinking about what change to do next - I'm going to build a PDA client. This will probably be part of the controller - this will allow the user to stream radio or any of their MP3 tracks to their PDA.

While I'm doing this I'll still post fixes as I find bugs.

Coordinator
Jan 12, 2008 at 3:39 PM
Wow, it's been a long time since I updated this....

So: Version 1 has been running at home since mid-October and, well, it works and is stable so I'm feeling confident about releasing. Unit tests on core code (networks, configuration, etc) provide code coverage of about 80% and unit tests for core server functionality (music send, library, etc) has coverage of about 45% so things have become much more stable of late.

I need to release version 1 for my own peace of mind and will have it out by end of Jan.

I've been working on integrating Airport Express support into the app and this is going well. Core components seem happy to talk to it and, because of the, quite frankly, amazing work done by Jon Lech Johansen (http://nanocr.eu/software/justeport/) I can piggy-back this to beat Apple's encryption. In real terms this means that my code can stream to the Airport with minimal fuss.

Not sure how long all this will take as it is still early days but will post updates.