
For my radio show iPhone application project, I wanted to use the metadata contained in my enhanced podcast files. Including:
- chapter information (artist/song)
- chapter start time
- chapter image
Once I had this information I wanted to store it in XML on my server so I could access it whenever I wanted (from the iPhone application).
Read more…

I have been working on a project that requires me to stream audio from a webserver to the iPhone, starting at an offset in an mp3 file. I showed how to modify Matt Gallagers awesome AudioStreamer code in a previous post. What I find myself doing quite a bit is stopping play on one file and starting play on another. Obviously you want the gap between tracks to be as minimal as possible.
The easy way to do this would be just to keep track of duration in a ’switcher’ object, Read more…

I found that I was needing an XML parser for nearly every iPhone application I was writing. Once you figure out the streaming nature of NSXMLParser, it really isn’t very difficult to use. However, since I was always having the didStartElement/foundCharacters/didEndElement functions in each application, I really wanted to break them out into a reusable class.
I found that most my XML implementations were VERY simple, as I was just using it for data storage and transfer. However, of course, each XML is different so my class has to handle that properly.
After making several iterations, I settled on using an NSArray for the root of the XML file. Each node is a NSDictionary with three object/key pairs:
Read more…

Starting with Matt Gallagher’s awesome AudioStreamer class, I wanted to extend it in a couple ways:
- Be able to play my radio show .mp3s hosted on my website (static files, not streams)
- Be able to start playback at any point in the file (startWithOffsetInSecs)
- Obviously, have it work on the iPhone
- Be able to have full control of audio & drawing while audio is playing
Actually, #3 & #4 are really what pushed me to find Matt’s class in the first place…so they aren’t really extensions of AudioStreamer, but rather why I chose to use AudioStreamer in the first place. The other major option was using something like MPMoviePlayerController. But that had several limitations which I won’t get into here.
Read more…

As part of my ‘learning ASP.NET’ series of posts, I thought I would discuss using the bit.ly url shortening API. I will add auto shortening to my
SpiniTweet application. SpiniTweet simply takes the last song played on
WMFO from
Spinitron, and creates a nicely formatted tweetable string. You click, ‘Tweet This’, and then you don’t have to re-type your tracks as you are djing on air to let people know what you are playing. I like to include a link to listen to ‘MFO live via the web, in case someone
wants to tune in. This is the link I want to shorten.
First off, apparently bit.ly doesn’t reuse links, so in my case I really don’t need to do this programmatically. But where is the fun in that?!?! Plus, I want to eventually add the ability for any link to be shortened in SpiniTweet, not just the WMFO listener link.
After you sign up for bit.ly, you get your API key in your profile. This is needed because they limit the total number of connects at one time. Next, check out the
documentation wiki! bit.ly uses a
REST api. If you really want details you can go read that linked wiki page. The bit.ly REST api is simple. We will be most interested in the ’shorten’ command, but there are others for doing things like expanding links and getting stats.
Our goal will be to send a url similar to this:
Read more…