Contents

init(contentsOfFile:byReference:)

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

Declaration

init?(contentsOfFile path: String, byReference byRef: Bool)

Parameters

  • path:

    Path to the sound file with which the receiver is to be initialized.

  • byRef:

    When True only the name of the sound is stored with the NSSound instance when archived using Encode(with:); otherwise the audio data is archived along with the instance.

Return Value

Initialized NSSound instance.

See Also

Creating Sounds