Thursday 21 February 2008

21/02/08 - Progress Report

The Schecdule, as outlined in the Functional Specification, is something like this:
  • Receive required hardware: October 2007 - January 2008
  • Interface sensors to the XBee: November 2007 - January 2008
  • Construct headset unit: December 2007 - March 2008
  • Daemon/components to gather sensor data: January 2008 - March 2008
  • Write audio feedback daemon: November 2007 - February 2008
  • Message router/state machine: November 2007 - March 2008
  • Demonstration applications: March 2008 - April 2008
  • Improvements and tuning: April 2008
  • System documentation: April 2008 - May 2008
The current state of each of those entries is as follows:
  • Receive required hardware: Originally planned hardware has arrived. Waiting on new hardware now (soundcard & wireless headphones).
  • Interface sensors to the XBee: Graham has completed this, see his blog for details.
  • Construct headset unit: Graham has completed this, see his blog for details.
  • Daemon/components to gather sensor data: Graham has completed this, see his blog for details.
  • Write audio feedback daemon: I did this in January and February. More details below.
  • Message router/state machine: I wrote this in November and December. It's approx. 85% complete, but will need some editing to reflect design changes made to other aspects. There are more details in this post.
  • Demonstration applications: The original intention was to write the demo applications when the framework is complete - obviously, we have found that writing them as we progress, in order to test each new component, is much better. The first demo application, described in posts here and here, has been written (February) and will continue to evolve over the next week or so. This puts us ahead of schedule in this area.
  • Improvements and tuning: We have both been working to improve our work as we think of ways (Graham has been tuning the hardware in an attempt to get a more accurate reading, I have been mostly researching methods of producing better 3D audio output in FMOD), though the real work in this area will begin once the framework is fully constructed and tested.
  • System documentation: No work has been done in this area yet.
From the above, we can see that currently, we are a little ahead of schedule! Good stuff.

Details on the audio component:
I started looking into this in mid to late December. At that point, I was still trying to decide which audio API to use. The choice was between OpenAL and FMOD.
Back then, I was attempting to write this component in Python, since it is a much cleaner and nicer language to program in, however, I had no success getting the OpenAL or the FMOD bindings for Python to work.
Around Christmas, with still no success getting either of these API's to work in Python (and no luck finding any other audio libraries for Python, which could produce 3D audio), I decided to write this component in C++ instead. I briefly thought about writing my own Python bindings, but ultimately it didn't seem worth the extra work.
At the beginning of January, before the exams, I wrote a test program in C++, using OpenAL. It worked, but the code was not very nice and the program was very brittle and dificult to manage. This is when I decided to use FMOD instead - which has a higher level API, a superior featureset and is very well supported.
No further work went into this until after the exams, but ever since I started writing the FMOD version, at the beginning of February, I have been constantly tuning the program and adding new features. When the first demo application was working (both the hardware and the GUI app), the audio component supported only a single sound source, which could be moved around 3D space using text commands over TCP/IP. The listener could also be moved and rotated to face any direction.
Within the next week, I added support for multiple sound sources (which could be created and destroyed at runtime, again, using the text commands over TCP/IP). Besides some minor tuning (mainly cleaning up the code), this is the current state of the program. Currently, it consists of 462 lines of C++ and I see this growing to over 1K before the program is fully complete.

No comments: