MusicKit  0.0.0
_DSPTransfer.h
00001 #ifndef __MK__DSPTransfer_H___
00002 #define __MK__DSPTransfer_H___
00003 /* Copyright 1988-1992, NeXT Inc.  All rights reserved. */
00004 
00005 #include "MKDSPDefines.h"
00006 
00007 MKDSP_API int _DSPPrintDatum(
00008     FILE *fp,
00009     DSPFix24 word);
00010 /*
00011  * Print DSP datum in decimal, hex, and fractional fixed-point.
00012  */
00013 
00014 
00015 MKDSP_API int _DSPPrintValue(
00016     DSPMemorySpace space,
00017     DSPAddress address);
00018 /*
00019  * Get DSP memory datum at space:address and print it.
00020  */
00021 
00022 
00023 MKDSP_API int _DSPDump(char *name);
00024 /*
00025  * Dump DSP external RAM into files of the form _DSPCat(name,"X.ram") etc.
00026  */
00027 
00028 
00029 /*** data arg should be in 2nd position but the shlib is frozen ***/
00030 MKDSP_API int _DSPMKSendUnitGeneratorWithLooperTimed(
00031     DSPFix48 *aTimeStampP, 
00032     DSPMemorySpace space,
00033     DSPAddress address,
00034     DSPFix24 *data,             /* DSP gets rightmost 24 bits of each word */
00035     int count,
00036     int looperWord);
00037 /*
00038  * Same as DSPMKSendArrayTimed() but tacks on one extra word which is a
00039  * DSP instruction which reads "jmp orchLoopStartAddress". Note that
00040  * code was copied from  DSPMKSendArraySkipTimed().
00041  */
00042 
00043 /* Flush? */
00044 MKDSP_API int _DSPMKSendTwoArraysTimed(
00045     DSPFix48 *aTimeStampP, 
00046     DSPMemorySpace space,
00047     DSPAddress address,
00048     DSPFix24 *data1,
00049     int count1,
00050     DSPFix24 *data2,
00051     int count2);
00052 
00053 /* Required for 1.0 MK binary compatibility */
00054 
00055 MKDSP_API int _DSPSendArraySkipTimed(
00056     DSPFix48 *aTimeStampP,
00057     DSPMemorySpace space,
00058     DSPAddress address,
00059     DSPFix24 *data,             /* DSP gets rightmost 24 bits of each word */
00060     int skipFactor,
00061     int count);
00062 /*
00063  * Calls DSPMKSendArraySkipModeTimed() with mode == DSP_MODE32.
00064  */
00065 
00066 MKDSP_API int _DSPSendValueTimed(
00067     DSPFix48 *aTimeStampP,
00068     DSPMemorySpace space,
00069     int addr,
00070     int value);
00071 
00072 MKDSP_API int _DSPSendLongTimed(
00073     DSPFix48 *aTimeStampP,
00074     int addr,
00075     DSPFix48 *aFix48Val);
00076 
00077 /******************** GETTING PRIVATE DSP MEMORY ADDRESSES *******************/
00078 
00079 MKDSP_API DSPAddress _DSPMKGetDMABufferAddress(void);
00080 /* 
00081  * Returns DSPGetSystemSymbolValue("YB_DMA_W").  This is the beginning of
00082  * the DSP DMA buffer pool used by the Music Kit.  Both sound-out and
00083  * read-data share this buffer memory.  It is carved up between input and
00084  * output at DSP open time.  The buffer size in each direction can also be
00085  * changed at run time.  Each direction is always double-buffered.
00086  */
00087 
00088 MKDSP_API DSPAddress _DSPMKGetDMABufferSize(void);
00089 /* 
00090  * Returns DSPGetSystemSymbolValue("NB_DMA").  This is the total size in
00091  * words of the DSP DMA buffer pool.  Typically it is four times the size of
00092  * each individual DSP DMA size (two for input and output).
00093  */
00094 
00095 #endif