views:

56

answers:

1

What does AudioServicesCreateSystemSoundID do?

All I was able to find was this from Apple's site:

// Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (
        soundFileURLRef,
        &soundFileObject
    );

And It isn't very helpful. I always see it created but then never used.

+2  A: 

It's used for playing short sounds and alerts. See this Audio & Video Coding How-To for a very small snippet of sample code.

The SysSound sample project has slightly more code.

However, the best sample code for using this I've seen is in the iPhone SDK Development book, chapter 17.2. You can download the code from the book here. Look for the SystemSoundsDemo project.

Robot K