SoundSprocket.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:27k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       SoundSprocket.h
  3.  
  4.      Contains:   SoundSprocket interfaces
  5.  
  6.      Version:    Technology: 1.7
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __SOUNDSPROCKET__
  18. #define __SOUNDSPROCKET__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __EVENTS__
  23. #include "Events.h"
  24. #endif
  25. #ifndef __QD3D__
  26. #include "QD3D.h"
  27. #endif
  28. #ifndef __QD3DCAMERA__
  29. #include "QD3DCamera.h"
  30. #endif
  31. #ifndef __MACERRORS__
  32. #include "MacErrors.h"
  33. #endif
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50. /*******************************************************************************
  51.  *  SndSetInfo/SndGetInfo Messages
  52.  ******************************************************************************/
  53. /*  The siSSpCPULoadLimit = '3dll' selector for SndGetInfo fills in a value of  */
  54. /*  type UInt32.                                                                */
  55. enum {
  56.     kSSpSpeakerKind_Stereo      = 0,
  57.     kSSpSpeakerKind_Mono        = 1,
  58.     kSSpSpeakerKind_Headphones  = 2
  59. };
  60. /*  This is the data type is used with the SndGet/SetInfo selector              */
  61. /*  siSSpSpeakerSetup = '3dst'                                                  */
  62. struct SSpSpeakerSetupData {
  63.     UInt32                          speakerKind;                /* Speaker configuration          */
  64.     float                           speakerAngle;               /* Angle formed by user and speakers  */
  65.     UInt32                          reserved0;                  /* Reserved for future use -- set to 0    */
  66.     UInt32                          reserved1;                  /* Reserved for future use -- set to 0    */
  67. };
  68. typedef struct SSpSpeakerSetupData      SSpSpeakerSetupData;
  69. enum {
  70.     kSSpMedium_Air              = 0,
  71.     kSSpMedium_Water            = 1
  72. };
  73. enum {
  74.     kSSpSourceMode_Unfiltered   = 0,                            /* No filtering applied             */
  75.     kSSpSourceMode_Localized    = 1,                            /* Localized by source position      */
  76.     kSSpSourceMode_Ambient      = 2,                            /* Coming from all around          */
  77.     kSSpSourceMode_Binaural     = 3                             /* Already binaurally localized      */
  78. };
  79. struct SSpLocationData {
  80.     float                           elevation;                  /* Angle of the meridian -- pos is up */
  81.     float                           azimuth;                    /* Angle of the parallel -- pos is left   */
  82.     float                           distance;                   /* Distance between source and listener   */
  83.     float                           projectionAngle;            /* Cos(angle) between cone and listener   */
  84.     float                           sourceVelocity;             /* Speed of source toward the listener    */
  85.     float                           listenerVelocity;           /*Speed of listener toward the source */
  86. };
  87. typedef struct SSpLocationData          SSpLocationData;
  88. struct SSpVirtualSourceData {
  89.     float                           attenuation;                /* Attenuation factor           */
  90.     SSpLocationData                 location;                   /* Location of virtual source        */
  91. };
  92. typedef struct SSpVirtualSourceData     SSpVirtualSourceData;
  93. /*  This is the data type is used with the SndGet/SetInfo selector              */
  94. /*  siSSpLocalization = '3dif'                                                  */
  95. struct SSpLocalizationData {
  96.     UInt32                          cpuLoad;                    /* CPU load vs. quality -- 0 is best  */
  97.     UInt32                          medium;                     /* Medium for sound propagation      */
  98.     float                           humidity;                   /* Humidity when medium is air         */
  99.     float                           roomSize;                   /* Reverb model -- distance bet. walls    */
  100.     float                           roomReflectivity;           /*Reverb model -- bounce attenuation  */
  101.     float                           reverbAttenuation;          /*Reverb model -- mix level      */
  102.     UInt32                          sourceMode;                 /* Type of filtering to apply        */
  103.     float                           referenceDistance;          /*Nominal distance for recording   */
  104.     float                           coneAngleCos;               /* Cos(angle/2) of attenuation cone     */
  105.     float                           coneAttenuation;            /* Attenuation outside the cone      */
  106.     SSpLocationData                 currentLocation;            /* Location of the sound           */
  107.     UInt32                          reserved0;                  /* Reserved for future use -- set to 0    */
  108.     UInt32                          reserved1;                  /* Reserved for future use -- set to 0    */
  109.     UInt32                          reserved2;                  /* Reserved for future use -- set to 0    */
  110.     UInt32                          reserved3;                  /* Reserved for future use -- set to 0    */
  111.     UInt32                          virtualSourceCount;         /*Number of reflections          */
  112.     SSpVirtualSourceData            virtualSource[4];           /*The reflections               */
  113. };
  114. typedef struct SSpLocalizationData      SSpLocalizationData;
  115. #if TARGET_CPU_PPC
  116. typedef CALLBACK_API_C( Boolean , SSpEventProcPtr )(EventRecord *inEvent);
  117. /*******************************************************************************
  118.  *  Global functions
  119.  ******************************************************************************/
  120. #if CALL_NOT_IN_CARBON
  121. EXTERN_API_C( OSStatus )
  122. SSpConfigureSpeakerSetup        (SSpEventProcPtr        inEventProcPtr);
  123. EXTERN_API_C( OSStatus )
  124. SSpGetCPULoadLimit              (UInt32 *               outCPULoadLimit);
  125. /*******************************************************************************
  126.  *  Routines for Maniulating Listeners
  127.  ******************************************************************************/
  128. #endif  /* CALL_NOT_IN_CARBON */
  129. typedef struct OpaqueSSpListenerReference*  SSpListenerReference;
  130. #if CALL_NOT_IN_CARBON
  131. EXTERN_API_C( OSStatus )
  132. SSpListener_New                 (SSpListenerReference * outListenerReference);
  133. EXTERN_API_C( OSStatus )
  134. SSpListener_Dispose             (SSpListenerReference   inListenerReference);
  135. EXTERN_API_C( OSStatus )
  136. SSpListener_SetTransform        (SSpListenerReference   inListenerReference,
  137.                                  const TQ3Matrix4x4 *   inTransform);
  138. EXTERN_API_C( OSStatus )
  139. SSpListener_GetTransform        (SSpListenerReference   inListenerReference,
  140.                                  TQ3Matrix4x4 *         outTransform);
  141. EXTERN_API_C( OSStatus )
  142. SSpListener_SetPosition         (SSpListenerReference   inListenerReference,
  143.                                  const TQ3Point3D *     inPosition);
  144. EXTERN_API_C( OSStatus )
  145. SSpListener_GetPosition         (SSpListenerReference   inListenerReference,
  146.                                  TQ3Point3D *           outPosition);
  147. EXTERN_API_C( OSStatus )
  148. SSpListener_SetOrientation      (SSpListenerReference   inListenerReference,
  149.                                  const TQ3Vector3D *    inOrientation);
  150. EXTERN_API_C( OSStatus )
  151. SSpListener_GetOrientation      (SSpListenerReference   inListenerReference,
  152.                                  TQ3Vector3D *          outOrientation);
  153. EXTERN_API_C( OSStatus )
  154. SSpListener_SetUpVector         (SSpListenerReference   inListenerReference,
  155.                                  const TQ3Vector3D *    inUpVector);
  156. EXTERN_API_C( OSStatus )
  157. SSpListener_GetUpVector         (SSpListenerReference   inListenerReference,
  158.                                  TQ3Vector3D *          outUpVector);
  159. EXTERN_API_C( OSStatus )
  160. SSpListener_SetCameraPlacement  (SSpListenerReference   inListenerReference,
  161.                                  const TQ3CameraPlacement * inCameraPlacement);
  162. EXTERN_API_C( OSStatus )
  163. SSpListener_GetCameraPlacement  (SSpListenerReference   inListenerReference,
  164.                                  TQ3CameraPlacement *   outCameraPlacement);
  165. EXTERN_API_C( OSStatus )
  166. SSpListener_SetVelocity         (SSpListenerReference   inListenerReference,
  167.                                  const TQ3Vector3D *    inVelocity);
  168. EXTERN_API_C( OSStatus )
  169. SSpListener_GetVelocity         (SSpListenerReference   inListenerReference,
  170.                                  TQ3Vector3D *          outVelocity);
  171. EXTERN_API_C( OSStatus )
  172. SSpListener_GetActualVelocity   (SSpListenerReference   inListenerReference,
  173.                                  TQ3Vector3D *          outVelocity);
  174. EXTERN_API_C( OSStatus )
  175. SSpListener_SetMedium           (SSpListenerReference   inListenerReference,
  176.                                  UInt32                 inMedium,
  177.                                  float                  inHumidity);
  178. EXTERN_API_C( OSStatus )
  179. SSpListener_GetMedium           (SSpListenerReference   inListenerReference,
  180.                                  UInt32 *               outMedium,
  181.                                  float *                outHumidity);
  182. EXTERN_API_C( OSStatus )
  183. SSpListener_SetReverb           (SSpListenerReference   inListenerReference,
  184.                                  float                  inRoomSize,
  185.                                  float                  inRoomReflectivity,
  186.                                  float                  inReverbAttenuation);
  187. EXTERN_API_C( OSStatus )
  188. SSpListener_GetReverb           (SSpListenerReference   inListenerReference,
  189.                                  float *                outRoomSize,
  190.                                  float *                outRoomReflectivity,
  191.                                  float *                outReverbAttenuation);
  192. EXTERN_API_C( OSStatus )
  193. SSpListener_SetMetersPerUnit    (SSpListenerReference   inListenerReference,
  194.                                  float                  inMetersPerUnit);
  195. EXTERN_API_C( OSStatus )
  196. SSpListener_GetMetersPerUnit    (SSpListenerReference   inListenerReference,
  197.                                  float *                outMetersPerUnit);
  198. /*******************************************************************************
  199.  *  Routines for Manipulating Sources
  200.  ******************************************************************************/
  201. #endif  /* CALL_NOT_IN_CARBON */
  202. typedef struct OpaqueSSpSourceReference*  SSpSourceReference;
  203. #if CALL_NOT_IN_CARBON
  204. EXTERN_API_C( OSStatus )
  205. SSpSource_New                   (SSpSourceReference *   outSourceReference);
  206. EXTERN_API_C( OSStatus )
  207. SSpSource_Dispose               (SSpSourceReference     inSourceReference);
  208. EXTERN_API_C( OSStatus )
  209. SSpSource_CalcLocalization      (SSpSourceReference     inSourceReference,
  210.                                  SSpListenerReference   inListenerReference,
  211.                                  SSpLocalizationData *  out3DInfo);
  212. EXTERN_API_C( OSStatus )
  213. SSpSource_SetTransform          (SSpSourceReference     inSourceReference,
  214.                                  const TQ3Matrix4x4 *   inTransform);
  215. EXTERN_API_C( OSStatus )
  216. SSpSource_GetTransform          (SSpSourceReference     inSourceReference,
  217.                                  TQ3Matrix4x4 *         outTransform);
  218. EXTERN_API_C( OSStatus )
  219. SSpSource_SetPosition           (SSpSourceReference     inSourceReference,
  220.                                  const TQ3Point3D *     inPosition);
  221. EXTERN_API_C( OSStatus )
  222. SSpSource_GetPosition           (SSpSourceReference     inSourceReference,
  223.                                  TQ3Point3D *           outPosition);
  224. EXTERN_API_C( OSStatus )
  225. SSpSource_SetOrientation        (SSpSourceReference     inSourceReference,
  226.                                  const TQ3Vector3D *    inOrientation);
  227. EXTERN_API_C( OSStatus )
  228. SSpSource_GetOrientation        (SSpSourceReference     inSourceReference,
  229.                                  TQ3Vector3D *          outOrientation);
  230. EXTERN_API_C( OSStatus )
  231. SSpSource_SetUpVector           (SSpSourceReference     inSourceReference,
  232.                                  const TQ3Vector3D *    inUpVector);
  233. EXTERN_API_C( OSStatus )
  234. SSpSource_GetUpVector           (SSpSourceReference     inSourceReference,
  235.                                  TQ3Vector3D *          outUpVector);
  236. EXTERN_API_C( OSStatus )
  237. SSpSource_SetCameraPlacement    (SSpSourceReference     inSourceReference,
  238.                                  const TQ3CameraPlacement * inCameraPlacement);
  239. EXTERN_API_C( OSStatus )
  240. SSpSource_GetCameraPlacement    (SSpSourceReference     inSourceReference,
  241.                                  TQ3CameraPlacement *   outCameraPlacement);
  242. EXTERN_API_C( OSStatus )
  243. SSpSource_SetVelocity           (SSpSourceReference     inSourceReference,
  244.                                  const TQ3Vector3D *    inVelocity);
  245. EXTERN_API_C( OSStatus )
  246. SSpSource_GetVelocity           (SSpSourceReference     inSourceReference,
  247.                                  TQ3Vector3D *          outVelocity);
  248. EXTERN_API_C( OSStatus )
  249. SSpSource_GetActualVelocity     (SSpSourceReference     inSourceReference,
  250.                                  TQ3Vector3D *          outVelocity);
  251. EXTERN_API_C( OSStatus )
  252. SSpSource_SetCPULoad            (SSpSourceReference     inSourceReference,
  253.                                  UInt32                 inCPULoad);
  254. EXTERN_API_C( OSStatus )
  255. SSpSource_GetCPULoad            (SSpSourceReference     inSourceReference,
  256.                                  UInt32 *               outCPULoad);
  257. EXTERN_API_C( OSStatus )
  258. SSpSource_SetMode               (SSpSourceReference     inSourceReference,
  259.                                  UInt32                 inMode);
  260. EXTERN_API_C( OSStatus )
  261. SSpSource_GetMode               (SSpSourceReference     inSourceReference,
  262.                                  UInt32 *               outMode);
  263. EXTERN_API_C( OSStatus )
  264. SSpSource_SetReferenceDistance  (SSpSourceReference     inSourceReference,
  265.                                  float                  inReferenceDistance);
  266. EXTERN_API_C( OSStatus )
  267. SSpSource_GetReferenceDistance  (SSpSourceReference     inSourceReference,
  268.                                  float *                outReferenceDistance);
  269. EXTERN_API_C( OSStatus )
  270. SSpSource_SetSize               (SSpSourceReference     inSourceReference,
  271.                                  float                  inLength,
  272.                                  float                  inWidth,
  273.                                  float                  inHeight);
  274. EXTERN_API_C( OSStatus )
  275. SSpSource_GetSize               (SSpSourceReference     inSourceReference,
  276.                                  float *                outLength,
  277.                                  float *                outWidth,
  278.                                  float *                outHeight);
  279. EXTERN_API_C( OSStatus )
  280. SSpSource_SetAngularAttenuation (SSpSourceReference     inSourceReference,
  281.                                  float                  inConeAngle,
  282.                                  float                  inConeAttenuation);
  283. EXTERN_API_C( OSStatus )
  284. SSpSource_GetAngularAttenuation (SSpSourceReference     inSourceReference,
  285.                                  float *                outConeAngle,
  286.                                  float *                outConeAttenuation);
  287. /*******************************************************************************
  288.  *  OpenGL Calling Convention Call Variants
  289.  ******************************************************************************/
  290. EXTERN_API_C( OSStatus )
  291. SSpListener_SetTransformfv      (SSpListenerReference   inListenerReference,
  292.                                  const float *          inTransform);
  293. EXTERN_API_C( OSStatus )
  294. SSpListener_GetTransformfv      (SSpListenerReference   inListenerReference,
  295.                                  float *                outTransform);
  296. EXTERN_API_C( OSStatus )
  297. SSpListener_SetPosition3f       (SSpListenerReference   inListenerReference,
  298.                                  float                  inX,
  299.                                  float                  inY,
  300.                                  float                  inZ);
  301. EXTERN_API_C( OSStatus )
  302. SSpListener_SetPositionfv       (SSpListenerReference   inListenerReference,
  303.                                  const float *          inPosition);
  304. EXTERN_API_C( OSStatus )
  305. SSpListener_GetPositionfv       (SSpListenerReference   inListenerReference,
  306.                                  float *                outPosition);
  307. EXTERN_API_C( OSStatus )
  308. SSpListener_SetOrientation3f    (SSpListenerReference   inListenerReference,
  309.                                  float                  inX,
  310.                                  float                  inY,
  311.                                  float                  inZ);
  312. EXTERN_API_C( OSStatus )
  313. SSpListener_SetOrientationfv    (SSpListenerReference   inListenerReference,
  314.                                  const float *          inOrientation);
  315. EXTERN_API_C( OSStatus )
  316. SSpListener_GetOrientationfv    (SSpListenerReference   inListenerReference,
  317.                                  float *                outOrientation);
  318. EXTERN_API_C( OSStatus )
  319. SSpListener_SetUpVector3f       (SSpListenerReference   inListenerReference,
  320.                                  float                  inX,
  321.                                  float                  inY,
  322.                                  float                  inZ);
  323. EXTERN_API_C( OSStatus )
  324. SSpListener_SetUpVectorfv       (SSpListenerReference   inListenerReference,
  325.                                  const float *          inUpVector);
  326. EXTERN_API_C( OSStatus )
  327. SSpListener_GetUpVectorfv       (SSpListenerReference   inListenerReference,
  328.                                  float *                outUpVector);
  329. EXTERN_API_C( OSStatus )
  330. SSpListener_SetCameraPlacementfv (SSpListenerReference  inListenerReference,
  331.                                  const float *          inCameraLocation,
  332.                                  const float *          inPointOfInterest,
  333.                                  const float *          inUpVector);
  334. EXTERN_API_C( OSStatus )
  335. SSpListener_GetCameraPlacementfv (SSpListenerReference  inListenerReference,
  336.                                  float *                outCameraPlacement,
  337.                                  float *                outPointOfInterest,
  338.                                  float *                outUpVector);
  339. EXTERN_API_C( OSStatus )
  340. SSpListener_SetVelocity3f       (SSpListenerReference   inListenerReference,
  341.                                  float                  inX,
  342.                                  float                  inY,
  343.                                  float                  inZ);
  344. EXTERN_API_C( OSStatus )
  345. SSpListener_SetVelocityfv       (SSpListenerReference   inListenerReference,
  346.                                  const float *          inVelocity);
  347. EXTERN_API_C( OSStatus )
  348. SSpListener_GetVelocityfv       (SSpListenerReference   inListenerReference,
  349.                                  float *                outVelocity);
  350. EXTERN_API_C( OSStatus )
  351. SSpListener_GetActualVelocityfv (SSpListenerReference   inListenerReference,
  352.                                  float *                outVelocity);
  353. EXTERN_API_C( OSStatus )
  354. SSpSource_SetTransformfv        (SSpSourceReference     inSourceReference,
  355.                                  const float *          inTransform);
  356. EXTERN_API_C( OSStatus )
  357. SSpSource_GetTransformfv        (SSpSourceReference     inSourceReference,
  358.                                  float *                outTransform);
  359. EXTERN_API_C( OSStatus )
  360. SSpSource_SetPosition3f         (SSpSourceReference     inSourceReference,
  361.                                  float                  inX,
  362.                                  float                  inY,
  363.                                  float                  inZ);
  364. EXTERN_API_C( OSStatus )
  365. SSpSource_SetPositionfv         (SSpSourceReference     inSourceReference,
  366.                                  const float *          inPosition);
  367. EXTERN_API_C( OSStatus )
  368. SSpSource_GetPositionfv         (SSpSourceReference     inSourceReference,
  369.                                  float *                outPosition);
  370. EXTERN_API_C( OSStatus )
  371. SSpSource_SetOrientation3f      (SSpSourceReference     inSourceReference,
  372.                                  float                  inX,
  373.                                  float                  inY,
  374.                                  float                  inZ);
  375. EXTERN_API_C( OSStatus )
  376. SSpSource_SetOrientationfv      (SSpSourceReference     inSourceReference,
  377.                                  const float *          inOrientation);
  378. EXTERN_API_C( OSStatus )
  379. SSpSource_GetOrientationfv      (SSpSourceReference     inSourceReference,
  380.                                  float *                outOrientation);
  381. EXTERN_API_C( OSStatus )
  382. SSpSource_SetUpVector3f         (SSpSourceReference     inSourceReference,
  383.                                  float                  inX,
  384.                                  float                  inY,
  385.                                  float                  inZ);
  386. EXTERN_API_C( OSStatus )
  387. SSpSource_SetUpVectorfv         (SSpSourceReference     inSourceReference,
  388.                                  const float *          inUpVector);
  389. EXTERN_API_C( OSStatus )
  390. SSpSource_GetUpVectorfv         (SSpSourceReference     inSourceReference,
  391.                                  float *                outUpVector);
  392. EXTERN_API_C( OSStatus )
  393. SSpSource_SetCameraPlacementfv  (SSpSourceReference     inSourceReference,
  394.                                  const float *          inCameraLocation,
  395.                                  const float *          inPointOfInterest,
  396.                                  const float *          inUpVector);
  397. EXTERN_API_C( OSStatus )
  398. SSpSource_GetCameraPlacementfv  (SSpSourceReference     inSourceReference,
  399.                                  float *                outCameraPlacement,
  400.                                  float *                outPointOfInterest,
  401.                                  float *                outUpVector);
  402. EXTERN_API_C( OSStatus )
  403. SSpSource_SetVelocity3f         (SSpSourceReference     inSourceReference,
  404.                                  float                  inX,
  405.                                  float                  inY,
  406.                                  float                  inZ);
  407. EXTERN_API_C( OSStatus )
  408. SSpSource_SetVelocityfv         (SSpSourceReference     inSourceReference,
  409.                                  const float *          inVelocity);
  410. EXTERN_API_C( OSStatus )
  411. SSpSource_GetVelocityfv         (SSpSourceReference     inSourceReference,
  412.                                  float *                outVelocity);
  413. EXTERN_API_C( OSStatus )
  414. SSpSource_GetActualVelocityfv   (SSpSourceReference     inSourceReference,
  415.                                  float *                outVelocity);
  416. #endif  /* CALL_NOT_IN_CARBON */
  417. #endif  /* TARGET_CPU_PPC */
  418. /*******************************************************************************
  419.  *    LATE-BREAKING NEWS
  420.  *
  421.  *    After the documentation was completed, it was decided that the SSpSetup
  422.  *  were not specific enough.  We renamed them to SSpSpeakerSetup.  These
  423.  *    #defines allow code to be written per the documentation.  But please use
  424.  * the new, longer names, as the #defines will be removed in a later release.
  425.  ******************************************************************************/
  426. #define SSpConfigureSetup       SSpConfigureSpeakerSetup
  427. #define siSSpSetup                siSSpSpeakerSetup
  428. #define SSpSetupData          SSpSpeakerSetupData
  429. /*******************************************************************************
  430.  *  MORE LATE-BREAKING NEWS
  431.  *
  432.  *  The SndGetInfo selector siSSpFilterVersion and datatype SSpFilterVersionData
  433.  *  have been removed in favor of an alternate way of accessing filter version
  434.  *  information.  The following function may be used for this purpose.
  435.  *******************************************************************************
  436. // **************************** GetSSpFilterVersion ****************************
  437. // Finds the manufacturer and version number of the SoundSprocket filter that
  438. // may be installed.  inManufacturer should be the manufacturer code specified
  439. // at the installation time, which may be zero to allow any manufacturer.
  440. // If no error is encountered, outManufacturer is set to the actual manufacturer
  441. // code and outMajorVersion and outMinorVersion are set to the component
  442. // specification level and manufacturer's implementation revision, respectively.
  443. OSStatus GetSSpFilterVersion(
  444.     OSType                  inManufacturer,
  445.     OSType*                 outManufacturer,
  446.     UInt32*                 outMajorVersion,
  447.     UInt32*                 outMinorVersion)
  448. {
  449.     OSStatus                err;
  450.     ComponentDescription    description;
  451.     Component               componentRef;
  452.     UInt32                  vers;
  453.     
  454.     // Set up the component description
  455.     description.componentType           = kSoundEffectsType;
  456.     description.componentSubType        = kSSpLocalizationSubType;
  457.     description.componentManufacturer   = inManufacturer;
  458.     description.componentFlags          = 0;        
  459.     description.componentFlagsMask      = 0;    
  460.     
  461.     // Find a component matching the description
  462.     componentRef = FindNextComponent(nil, &description);
  463.     if (componentRef == nil)  return couldntGetRequiredComponent;
  464.     
  465.     // Get the component description (for the manufacturer code)
  466.     err = GetComponentInfo(componentRef, &description, nil, nil, nil);
  467.     if (err != noErr)  return err;
  468.     
  469.     // Get the version composite
  470.     vers = (UInt32) GetComponentVersion((ComponentInstance) componentRef);
  471.     
  472.     // Return the results
  473.     *outManufacturer = description.componentManufacturer;
  474.     *outMajorVersion = HiWord(vers);
  475.     *outMinorVersion = LoWord(vers);
  476.     
  477.     return noErr;
  478. }
  479. *******************************************************************************/
  480. #if PRAGMA_STRUCT_ALIGN
  481.     #pragma options align=reset
  482. #elif PRAGMA_STRUCT_PACKPUSH
  483.     #pragma pack(pop)
  484. #elif PRAGMA_STRUCT_PACK
  485.     #pragma pack()
  486. #endif
  487. #ifdef PRAGMA_IMPORT_OFF
  488. #pragma import off
  489. #elif PRAGMA_IMPORT
  490. #pragma import reset
  491. #endif
  492. #ifdef __cplusplus
  493. }
  494. #endif
  495. #endif /* __SOUNDSPROCKET__ */