Mac OS X Reference Library Apple Developer
Search

Overview of the NSSound Class

The NSSound class makes it extremely simple for Cocoa applications to load and play soundfiles. Instance methods provide standard transport control so that a sound can be programmatically started, stopped and paused.

The class supports the following file and data formats:

You can load audio data into an NSSound object from three sources:

  1. a disk file—using a pathname or URL

  2. network connection—using a URL

  3. the pasteboard

The NSSound class can search for named sound resources in the application’s main bundle as well as two standard file system locations: /Library/Sounds and ~/Library/Sounds.




Last updated: 2006-11-07

Did this document help you? Yes It's good, but... Not helpful...