Devconnect XBIOS call to connect
the DSP between your source and destination devices. So for example, say you wanted to
do some real-time processing, you connect the ADC to the DSP IN, and the
DSP OUT to the DAC.Do this with the lines:
Or if your an assembler freak:
Devconnect(3,2,srcclk,prescale,1);
Devconnect(1,8,srcclk,prescale,1);
However, if all you do is this, then you will get nothing (unless something has allready used
the DSP, in which case it will be unpredictable). Before you actually connect the DSP up,
you should have the DSP program which actually does the processing loaded. Use DSP_reserve
to reserve some space, and then DSP_LoadProg to load/execute your .LOD file.
move.w #1,-(sp)
move.w prescale,-(sp)
move.w srcclk,-(sp)
move.w #2,-(sp)
move.w #3,-(sp)
move.w #139,-(sp)
trap #14
lea 12(sp),sp
move.w #1,-(sp)
move.w prescale,-(sp)
move.w srcclk,-(sp)
move.w #8,-(sp)
move.w #1,-(sp)
move.w #139,-(sp)
trap #14
lea 12(sp),sp
The .LOD file will have been written in DSP assembler, with some code to recieve the data, and to transmit the data. I have code for this, which is available here as an LZH, or here is the very simple piece of code here
As I know nothing about actual processing of audio data (to do interesting things like flange, reverb etc.) I will not be covering this side of it. If YOU know something about that, then maybe you could send me some details to me, and I'll include them here...