MonobjcMonobjc Documented Class Library
NSSound Constructor (filepath, byRef)
NamespacesMonobjc.AppKitNSSoundNSSound(NSString, Boolean)

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

Original signature is '- (id)initWithContentsOfFile:(NSString *)filepath byReference:(BOOL)byRef'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSSound(
	NSString filepath,
	bool byRef
)
Public Sub New ( _
	filepath As NSString, _
	byRef As Boolean _
)
public:
NSSound(
	NSString^ filepath, 
	bool byRef
)
Parameters
filepath (NSString)
Path to the sound file with which the receiver is to be initialized.
byRef (Boolean)
When YES only the name of the sound is stored with the NSSound instance when archived using encodeWithCoder:; otherwise the audio data is archived along with the instance.
Return Value
Initialized NSSound instance.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)