Winapi: midioutcachepatches-preinstalled tone

Source: Internet
Author: User
Tip:
Each element in the array of parameter 3 represents one of the 128 tone types;
The MIDI channel is represented by 0 .. 15. For example, the channels 0 and 8 use the 0 tone, and The 0th elements of the array are $0101.

// Declaration: midioutcachepatches (hmidiout: hmidiout; {Device handle; this device should be an internal synthesizer} ubank: uint; {specifies the tone group; default value: 0} lpwpatcharray: pword; {tpatcharray array pointer; specifies the tone to be loaded or loaded in this array} uflags: uint {Option}): mmresult; {0 is returned successfully; possible error values:} mmsyserr_invalhandle = 5; {invalid device handle} mmsyserr_nomem = 7; {There is not enough space to load the tone} mmsyserr_notsupported = 8; {Device not supported} // lpwpatcharray related: ppatcharray = ^ tpatcharray; tpatcharray = array [0 .. MIDIPATCHSIZE-1] of word; {midipatchsize is a constant:} midipatchsize = 128; // uflags: midi_cache_all = 1; {load all specified sounds, if not all loaded, give up, clear the tone array, and return the mmsyserr_nomem} midi_cache_bestfit = 2; {load all specified sounds. If not all sounds are loaded, try to load them. Modify the tone array to indicate which sounds are installed, also, mmsyserr_nomem} midi_cache_query = 3; {modifying the tone array indicates which tone is being loaded} midi_uncache = 4; {loading and unloading the specified tone and clearing the tone array} is returned}

 // Example:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.