ADC Home > Reference Library > Technical Q&As > Legacy Documents > QuickTime >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q How can I determine if QuickTime 2.0's MIDI music function is
available and if the larger set of 41 instruments is available? If the MIDI
function is available, we need to add code to enable the music portion of our game. A The QuickTime music architecture became available in version 2.0, so checking the QuickTime version in a Gestalt call (selector: gestaltQuickTimeVersion) will tell you if the MIDI function is present. When you install System 7.5 from the CD, the QuickTime Musical Instruments Extension is installed in your system folder. This gives you the number of musical instruments supported by Apple. The QuickTime Musical Instruments Extension is actually a component. If you need to know if the instruments are present, issue FindNextComponent, searching for a component that has a type of 'inst' and subtype of 'ss '. To verify the results of the search, use MacsBug dcmd 'thing' or CDEV 'Things!'. Both are on the QuickTime 2.0 SDK CD ("Mac: QuickTime Tools: Things!" and "Mac: Programming stuff: QuickTime Debugging"). Here is a code snippet that ought to help you: pascal Boolean AreQuickTimeMusicInstrumentsPresent(void) { ComponentDescription aCD; aCD.componentType = 'inst'; aCD.componentSubType = 'ss '; aCD.componentManufacturer = 'appl'; if(FindNextComponent((Component)0, &aCD) != NULL) return true; else return false; } [May 01 1995] |
|