Instance Method

initWithPasteboard:

Initializes the receiver with data from a pasteboard. The pasteboard should contain a type returned by NSSound. NSSound expects the data to have a proper magic number, sound header, and data for the formats it supports.

Declaration

- (instancetype)initWithPasteboard:(NSPasteboard *)pasteboard;

Parameters

pasteboard

The pasteboard containing the audio data with which the receiver is to be initialized. The pasteboard must contain a type returned by NSSound. The contained data must have a proper magic number, sound header, and data for the formats the NSSound class supports.

Return Value

Initialized NSSound instance.

See Also

Creating Sounds

+ canInitWithPasteboard:

Indicates whether the receiver can create an instance of itself from the data in a pasteboard.

- initWithContentsOfFile:byReference:

Initializes the receiver with the audio data located at a given filepath.

- initWithContentsOfURL:byReference:

Initializes the receiver with the audio data located at a given URL.

- initWithData:

Initializes the receiver with a given audio data.