/* Randsam header file */



#define CMDPORTNAME "Randsam cmd port"


struct commandrequest {
    struct Message cmd_Msg;   /* Standard msg */
    LONG Command;             /* Command types below */
    char *data1;              /* Optional data pointers used by COM_CONF */
    char *data2;
};

#define COM_QUIT   1
#define COM_PLAY   2          /* play all the samples in the config */
#define COM_CONF   3          /* Data request.
                               * returns pointers to
                               * struct Values
                               * struct SampleData (Only the last played) */


struct Values {
    ULONG   vl_num       ,    /* Number of available samples */
            vl_cur       ,    /* Current sample number */
            vl_mindelay  ,    /* Minimum delay in secs */
            vl_maxdelay  ,    /* Maximum */
            vl_mincyc    ,    /* Minimum cycles        */
            vl_maxcyc    ,    /* Maximum cycles        */
            vl_randseed  ,    /* Random seed used      */
            vl_waittime;      /* Seconds left for the timer-request */
    UWORD   vl_maxdiff   ,    /* Maximum period difference */
            vl_diff      ,    /* Difference on current (last) sample */
            vl_speed     ,    /* period value */
            vl_Cyc       ,    /* number of cycles      */
            vl_vol;           /* Volume */
};

struct SampleData {
    char    Name[128];
    WORD    Period;
    WORD    Cycles;
    WORD    Vol;
};


