MusicKit
0.0.0
|
00001 #ifndef __MK_dspdriver_types_H___ 00002 #define __MK_dspdriver_types_H___ 00003 /* 00004 * $Id$ 00005 * Author: David Jaffe 00006 * DSP driver typedefs, defines, etc. 00007 */ 00008 00009 00010 #ifndef _DSPDRIVER_TYPES_ 00011 #define _DSPDRIVER_TYPES_ 00012 00013 #import <mach/kern_return.h> 00014 #import <mach/message.h> 00015 #import <mach/port.h> 00016 00017 /* error codes */ 00018 #define DSPDRIVER_ERROR_BUSY 100 00019 #define DSPDRIVER_ERROR_NOT_OWNER 101 00020 #define DSPDRIVER_ERROR_TIMEOUT 102 00021 #define DSPDRIVER_ERROR_BAD_UNIT_OR_DRIVER 103 00022 #define DSPDRIVER_ERROR_BAD_ID 104 00023 #define DSPDRIVER_ERROR_BAD_TRANSFER_CHAN 105 00024 #define DSPDRIVER_ERROR_BAD_TRANSFER_REQUEST 106 00025 #define DSPDRIVER_ERROR_UNKNOWN_ERROR 107 00026 00027 /* DSP_MAX_IN_LINE_BYTES is the maximum number of data bytes that can be 00028 * sent to or received from the driver in a single package using 00029 * in-line data. 00030 */ 00031 #define DSP_MAX_IN_LINE_BYTES 2048 00032 #define DSP_MAX_SHORTS (DSP_MAX_IN_LINE_BYTES/2) 00033 #define DSP_MAX_WORDS (DSP_MAX_IN_LINE_BYTES/4) 00034 #define DSP_MAX_PACKED (DSP_MAX_IN_LINE_BYTES/3) 00035 #define DSP_MAX_PACKED_BYTES (3*(DSP_MAX_PACKED)) 00036 00037 /* DSP_MAX_MSG_SIZE is the maximum size of the message you 00038 * can receive from the driver. (This doesn't include out-of-line 00039 * data). 00040 */ 00041 #define DSP_MAX_MSG_SIZE 5120 // More than enough 00042 00043 /* Mig foolishness */ 00044 typedef int *DSPWordPtr; 00045 typedef short *DSPShortPtr; 00046 typedef char *DSPCharPtr; 00047 typedef int *DSPPagePtr; 00048 00049 #endif _DSPDRIVER_TYPES_ 00050 00051 #endif