Instance Method

initWithData:soundBankURL:error:

Initializes a newly allocated MIDI player with the contents of the data object.

Declaration

- (instancetype)initWithData:(NSData *)data soundBankURL:(NSURL *)bankURL error:(NSError * _Nullable *)outError;

Parameters

data

The data to play.

bankURL

The URL of the sound bank. The sound bank must be a SoundFont2 or DLS bank.

outError

Returns, by-reference, a description of the error, if an error occurs.

Return Value

An initialized AVMidiPlayer instance or nil if an error is encountered.

Discussion

See Also

Creating a MIDI Player

- initWithContentsOfURL:soundBankURL:error:

Initializes a newly allocated MIDI player with the contents of the file specified by the URL, using the specified sound bank.