MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 00004 Defined In: The MusicKit 00005 Description: 00006 This file represents that portion of the MusicKit's private interface 00007 that the UnitGenerator library depends on. 00008 00009 Original Author: David A. Jaffe 00010 00011 Copyright (c) 1988-1992, NeXT Computer, Inc. 00012 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00013 Portions Copyright (c) 1994 Stanford University. 00014 Portions Copyright (c) 1999-2001, The MusicKit Project. 00015 */ 00016 /* 00017 Modification history: 00018 $Log$ 00019 Revision 1.3 2001/09/15 17:12:07 leighsmith 00020 Merged RTF class documentation into headerdoc comments 00021 00022 00023 10/12/89/daj - Created. 00024 11/12/89/daj - Added _MKClassSamples() and _MKClassPartials(). 00025 11/22/89/daj - Added _MKGetEnvelopeNth(). 00026 11/26/89/daj - Added _MKBeginUGBlock() and _MKEndUGBlock(). 00027 3/7/93/daj - Moved somet things from _unitGeneratorInclude.h to here. 00028 3/7/93/daj - Added tracing support 00029 2/26/94/daj - Got rid of _MKUGLog2 00030 */ 00031 #ifndef __MK__exportedPrivateMusickit_H___ 00032 #define __MK__exportedPrivateMusickit_H___ 00033 00034 00035 extern BOOL _MKUGIsPowerOf2 (int n); 00036 extern int _MKUGNextPowerOf2(int n); 00037 00038 extern id _MKErrorf(int errorCode, ...); 00039 /* Calling sequence like printf, but first arg is error code instead of 00040 formating info and the formating info is derived from MKGetErrStr(). 00041 It's the caller's responsibility 00042 that the expansion of the arguments using sprintf doesn't 00043 exceed the size of the error buffer (MK_ERRLEN). Fashions the 00044 error message and sends it to MKError(). */ 00045 00046 typedef struct __MKClassLoaded { 00047 id aClass; 00048 BOOL alreadyChecked; 00049 } _MKClassLoaded; 00050 00051 extern _MKClassLoaded _MKEnvelopeClass; 00052 extern _MKClassLoaded _MKSamplesClass; 00053 extern _MKClassLoaded _MKPartialsClass; 00054 extern _MKClassLoaded _MKConductorClass; 00055 00056 extern id _MKCheckClassEnvelope() ; 00057 extern id _MKCheckClassConductor(); 00058 extern id _MKCheckClassSamples(); 00059 extern id _MKCheckClassPartials(); 00060 00061 #define _MKClassSamples() \ 00062 ((_MKSamplesClass.alreadyChecked) ? _MKSamplesClass.aClass : \ 00063 _MKCheckClassSamples()) 00064 00065 #define _MKClassPartials() \ 00066 ((_MKPartialsClass.alreadyChecked) ? _MKPartialsClass.aClass : \ 00067 _MKCheckClassPartials()) 00068 00069 #define _MKClassEnvelope() \ 00070 ((_MKEnvelopeClass.alreadyChecked) ? _MKEnvelopeClass.aClass : \ 00071 _MKCheckClassEnvelope()) 00072 00073 #define _MKClassConductor() \ 00074 ((_MKConductorClass.alreadyChecked) ? _MKConductorClass.aClass : \ 00075 _MKCheckClassConductor()) 00076 00077 extern DSPFix24 _MKDoubleToFix24(double dval); 00078 extern void _MKBeginUGBlock(id anOrch); 00079 extern void _MKEndUGBlock(void); 00080 00081 /* For debugging */ 00082 extern void _MKOrchTrace(id orch,int typeOfInfo,char * fmt, ...); 00083 extern unsigned _MKTraceFlag; 00084 #define _MKTrace() _MKTraceFlag 00085 extern FILE *_MKGetOrchSimulator(); 00086 #define _MK_ORCHTRACE(_orch,_debugFlag) \ 00087 ((_MKTraceFlag & _debugFlag) || (_MKGetOrchSimulator(_orch))) 00088 00089 extern MKEnvStatus _MKGetEnvelopeNth(id self,int n,double *xPtr,double *yPtr, 00090 double *smoothingPtr); 00091 00092 #define _MK_ERRTAB _MKErrorStringFile() 00093 00094 #import <Foundation/NSObject.h> 00095 00096 @interface musickitprivatemsgs: NSObject 00097 00098 +(MKMsgStruct *) _cancelMsgRequest:(MKMsgStruct *)aMsgStructPtr; 00099 +(MKMsgStruct *) _newMsgRequestAtTime:(double )timeOfMsg sel:(SEL )whichSelector to:destinationObject argCount:(int )argCount, ...; 00100 -(void ) _scheduleMsgRequest:(MKMsgStruct *)aMsgStructPtr; 00101 -(MKMsgStruct *) _rescheduleMsgRequest:(MKMsgStruct *)aMsgStructPtr atTime:(double )timeOfNewMsg sel:(SEL )whichSelector to:destinationObject argCount:(int )argCount, ...; 00102 00103 @end 00104 00105 #endif