tags:

views:

215

answers:

1

My current need is to provide an audio cue for an application with a timer, that would work on 1st gen ipods (i.e. iPods without a speaker).

I know that the bundled clock application of the iPod can use the internal speaker/beeper/clicker to show that the timer has run out.

Is there an api to interact with this speaker ?

A: 

To use the piezo speaker, you need:
Framework: AudioToolbox.framework
Header: #import "AudioToolbox/AudioToolbox.h"
Function: AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);

Please note that sound will come through only if the user hasn't deactivated it in it's iPod/iPhone preference. This code will also make an iPhone vibrate if vibration is activated on the phone.

pbreault