Produces a decompressed version of a packed soundfont.
Unicode version only here (BASS_UNICODE will be used automatically).
Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- handle
- Type: SystemInt32
The soundfont to unpack. - outfile
- Type: SystemString
Filename for the unpacked soundfont.
Return Value
Type: BooleanIf successful, the is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
A soundfont should not be unpacked while it is being used to render any MIDI streams, as that could delay the rendering. BASS_MIDI_FontGetInfo(Int32, BASS_MIDI_FONTINFO) can be used to check if a soundfont is packed.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | The soundfont is not packed. |
BASS_ERROR_INIT | BASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) has not been successfully called - it needs to be to decode the samples. |
BASS_ERROR_CODEC | The appropriate add-on to decode the samples is not loaded. |
BASS_ERROR_CREATE | Couldn't create the output file, outfile. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Examples
// load FLAC plugin Bass.BASS_PluginLoad("bassflac.dll"); // open soundfont int handle = BassMidi.BASS_MIDI_FontInit("afile.sf2pack"); // produce unpacked version BassMidi.BASS_MIDI_FontUnpack(handle, "afile.sf2");
See Also