pub unsafe extern "C-unwind" fn CopyInstrumentInfoFromSoundBank(
in_url: &CFURL,
out_instrument_info: NonNull<*const CFArray>,
) -> i32objc2-core-foundation only.Expand description
This will return a CFArray of CFDictionaries, one per instrument found in the DLS or SF2 bank. Each dictionary will contain four items accessed via CFStringRef versions of the keys kInstrumentInfoKey_MSB, kInstrumentInfoKey_LSB, kInstrumentInfoKey_Program, and kInstrumentInfoKey_Name. MSB: An NSNumberRef for the most-significant byte of the bank number. GM melodic banks will return 120 (0x78). GM percussion banks will return 121 (0x79). Custom banks will return their literal value. LSB: An NSNumberRef for the least-significant byte of the bank number. All GM banks will return the bank variation number (0-127). Program Number: An NSNumberRef for the program number (0-127) of an instrument within a particular bank. Name: A CFStringRef containing the name of the instrument.
Using these MSB, LSB, and Program values will guarantee that the correct instrument is loaded by the DLS synth or Sampler Audio Unit. The CFArray should be released by the caller.
Parameter inURL: The URL for the sound bank.
Parameter outInstrumentInfo: A pointer to a CFArrayRef to be created and returned by the function.
Returns: returns noErr if successful.
ยงSafety
out_instrument_info must be a valid pointer.