/*
 delayst.h:
 
 Copyright (C) 2011 Casey Mongoven
 
 This plugin is used in order to simulate using delay (and phase) the interaural difference between a signal originating 
 within a 60 degree span using stereo speakers placed at 60 degrees. -30 is hard left, 0 in the middle and 30 represents 
 hard right. It could also be used to similar purposes with headphones. The opcode is designed to simulate the type of delay 
 which occurs if events occur successively temporally in an arc but which are naturally "bent" by the distance between our 
 ears so that if one examines the first arrival of a sound to the ears the events are not exactly successive but revolve 
 around an axis. The minimum distance to a listeners ear from a speaker is subtracted from the delay in this opcode in 
 order to cut off less of the signal. In normal circumstances, the maximum delay which will occur is less than 1/4 
 milliseconds. 
 
 */

#include <csdl.h>

typedef struct {
    OPDS    h;
    MYFLT   *a1, *a2, *asig, *iazim, *irad, *ihwid, *isos;
    MYFLT   *curp, *curp1, *curp2;
    int32   npts;
    AUXCH   auxch;
} DELAYST;

int delaystset(CSOUND *, DELAYST *p);
int delayst(CSOUND *, DELAYST *p);