Tuesday, June 2, 2009

DevDiary: Time-shifting live radio streaming

Ah, the joys of refactoring code. I took a couple days to rewrite portions of the audio streaming code used in my radio apps to add some more enhancements. In addition to making the code much more modular to allow it to be easily dropped into new projects with no external dependencies, I made a significant improvement.

The code will now allow the live stream to be buffered for up to 10 minutes! This means if you are listening to a radio program and get distracted and miss a bit of what was just played, you can simply rewind the program. Then, if you choose, you can continue to listen to the program slightly time-shifted, or, just fast-forward back to the live portion of the stream.

Or, if you need to take short break from listening, but don't want to miss anything, you can pause the program for up to 10 minutes and all the new content will be buffered.

The only limit imposed right now is the buffer is designed to hold 10 total minutes worth of audio and this includes both pausing and rewinding. You can't both pause the program for 10 minutes AND have the ability to rewind 10 minutes into the past. If you pause the program for 5 minutes, you'll only have 5 minutes of the program buffered in the past.

Hopefully my clients will find this new feature useful.

All content copyright © 2009  Brian Stormont, unless otherwise noted.   All rights reserved.