Yearly Archives: 2008

Warp 1.2 Beta 1

The latest beta of Warp includes a couple minor bug fixes as well as a new floating pager that gives you constant access to your spaces. The pager shows you a live preview of each space; clicking on another space will switch to it. Visibility of the pager can be toggled with a hot key.

Warp Pager

Changes from Warp 1.1.1:

  • Added a floating pager that allows rapid switching between spaces.
  • Click-to-warp floating window no longer appears when dragging items.
  • Fixed wrapping around a single row or column of spaces.
  • The Warp helper application now automatically relaunches when updating.

Download Warp 1.2 Beta 1

iPhone SDK: Please respect my music choice!

In using all of the great new apps appearing on the App Store, a problem I’m often running into is that some apps, typically games, will interrupt the music that I’m listening to with and begin playing their own splash screen sounds or background music. Sometimes it happens for a short sound effect and nothing else, which is doubly annoying. While it is possible to re-override the new application’s sound by double-pressing the home button and pressing play again, it is a step that shouldn’t be necessary.

With the 2.0 firmware there wasn’t any way around interrupting users’ music, as Apple provided no way of even checking if any music was already playing. Thanks to the new iPhone 2.1 firmware, we can now do this! Moreover, it is simple:

UInt32 isPlaying;
UInt32 propertySize = sizeof(isPlaying);

AudioSessionInitialize(NULL, NULL, NULL, NULL);
kAudioSessionProperty_OtherAudioIsPlaying, &propertySize, &isPlaying);

If isPlaying is 0, no music is playing. If it is any other value, please let users continue to listen to what they chose to play! It is remarkably easy to do, so there should be no excuses about additional complexity.

I’ve also created a small sample program that demonstrates checking music status on the phone. It has to be run on a device, as checking the kAudioSessionProperty_OtherAudioIsPlaying property doesn’t return successfully in the simulator. The sample code also checks music playback status when the program reactivates, such as after the user double-presses the home button to bring up the music status. This provides a chance to start your own application’s music later on should the user desire. The source is public domain, use it as you see fit.

Download MusicStatus Source