Initializer

init(data:soundBankURL:)

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

Declaration

init(data: Data, soundBankURL bankURL: URL?) throws

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

init(contentsOf: URL, soundBankURL: URL?)

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