Changeset 7258c6a in buchla-68k for include/instdsp.h


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/instdsp.h

    r0292fbb r7258c6a  
    117117
    118118        struct  pflent  *nextpf;        /* next entry pointer */
    119         unsigned        pftrig;         /* trigger number */
    120         unsigned        pfvpval;        /* voice / parameter number */
    121         long            d1reg;          /* D1 register contents */
    122         long            d2reg;          /* D2 register contents */
    123         long            d4reg;          /* D4 register contents */
    124         char            *a1reg;         /* A1 register contents */
    125         char            *a2reg;         /* A2 register contents */
    126         char            *a3reg;         /* A3 register contents */
     119        uint16_t        pftrig;         /* trigger number */
     120        uint16_t        pfvpval;        /* voice / parameter number */
     121        int32_t         d1reg;          /* D1 register contents */
     122        int32_t         d2reg;          /* D2 register contents */
     123        int32_t         d4reg;          /* D4 register contents */
     124        int8_t          *a1reg;         /* A1 register contents */
     125        int8_t          *a2reg;         /* A2 register contents */
     126        int8_t          *a3reg;         /* A3 register contents */
    127127};
    128128
     
    135135struct  instpnt {       /* function point definition */
    136136
    137         short   iptim;          /* time (packed) */
    138         short   ipval;          /* value */
    139         short   ipvmlt;         /* value multiplier */
    140 
    141         char    ipvsrc;         /* value source */
    142         char    ipact;          /* action code */
     137        int16_t iptim;          /* time (packed) */
     138        int16_t ipval;          /* value */
     139        int16_t ipvmlt;         /* value multiplier */
     140
     141        int8_t  ipvsrc;         /* value source */
     142        int8_t  ipact;          /* action code */
    143143
    144144#define AC_NULL         0       /* null action */
     
    151151#define AC_UNDF         7       /* -- undefined - treated as AC_NULL -- */
    152152
    153         char    ippar1;         /* action parameter 1  (point) */
    154         char    ippar2;         /* action parameter 2  (count) */
    155 
    156         char    ippar3;         /* action parameter 3  (counter) */
    157         char    ippad;          /* padding for even boundary */
     153        int8_t  ippar1;         /* action parameter 1  (point) */
     154        int8_t  ippar2;         /* action parameter 2  (count) */
     155
     156        int8_t  ippar3;         /* action parameter 3  (counter) */
     157        int8_t  ippad;          /* padding for even boundary */
    158158};
    159159
     
    166166struct  idfnhdr {       /* function header */
    167167
    168         short   idfpch;         /* pitch (used for freq1 only) */
    169         short   idfmlt;         /* overall value multiplier (-1 .. +1) */
    170 
    171         char    idfsrc;         /* overall value source */
    172         char    idfpif;         /* points in the function */
    173 
    174         char    idfpt1;         /* index of first point (0..NIPTS) */
    175         char    idftmd;         /* trigger mode and control bits */
     168        int16_t idfpch;         /* pitch (used for freq1 only) */
     169        int16_t idfmlt;         /* overall value multiplier (-1 .. +1) */
     170
     171        int8_t  idfsrc;         /* overall value source */
     172        int8_t  idfpif;         /* points in the function */
     173
     174        int8_t  idfpt1;         /* index of first point (0..NIPTS) */
     175        int8_t  idftmd;         /* trigger mode and control bits */
    176176
    177177#define I_TM_KEY        0x01    /* trigger on key closure */
     
    181181#define I_VNSUBN        0x08    /* new value sub-n bit    (matches hardware) */
    182182
    183         char    idfcpt;         /* index of current point (0..NIPTS) */
    184         char    idfprm;         /* parameter associated with this function */
    185 
    186         short   idftrg;         /* trigger that started the function */
     183        int8_t  idfcpt;         /* index of current point (0..NIPTS) */
     184        int8_t  idfprm;         /* parameter associated with this function */
     185
     186        int16_t idftrg;         /* trigger that started the function */
    187187};
    188188
     
    195195struct  instdef {       /* instrument definition */
    196196
    197         short   idhflag;                /* flags */
    198 
    199         char    idhname[MAXIDLN+1];     /* instrument name */
    200         char    idhcom1[MAXIDLN+1];     /* first line of comments */
    201         char    idhcom2[MAXIDLN+1];     /* second line of comments */
    202         char    idhcom3[MAXIDLN+1];     /* third line of comments */
    203 
    204         char    idhcfg;                 /* configuration byte */
    205         char    idhplft;                /* points unused */
    206 
    207         char    idhwsa;                 /* waveshape A library number */
    208         char    idhwsb;                 /* waveshape B library number */
    209 
    210         char    idhos1c;                /* oscillator 1 controls */
    211         char    idhos2c;                /* oscillator 2 controls */
    212         char    idhos3c;                /* oscillator 3 controls */
    213         char    idhos4c;                /* oscillator 4 controls */
     197        int16_t idhflag;                /* flags */
     198
     199        int8_t  idhname[MAXIDLN+1];     /* instrument name */
     200        int8_t  idhcom1[MAXIDLN+1];     /* first line of comments */
     201        int8_t  idhcom2[MAXIDLN+1];     /* second line of comments */
     202        int8_t  idhcom3[MAXIDLN+1];     /* third line of comments */
     203
     204        int8_t  idhcfg;                 /* configuration byte */
     205        int8_t  idhplft;                /* points unused */
     206
     207        int8_t  idhwsa;                 /* waveshape A library number */
     208        int8_t  idhwsb;                 /* waveshape B library number */
     209
     210        int8_t  idhos1c;                /* oscillator 1 controls */
     211        int8_t  idhos2c;                /* oscillator 2 controls */
     212        int8_t  idhos3c;                /* oscillator 3 controls */
     213        int8_t  idhos4c;                /* oscillator 4 controls */
    214214
    215215#define OC_MOD          0x0003          /* oscillator mode mask */
     
    222222#define OC_SYN          0x0004          /* oscillator in sync mode */
    223223
    224         short   idhos1v;                /* oscillator 1 value */
    225         short   idhos2v;                /* oscillator 2 value */
    226         short   idhos3v;                /* oscillator 3 value */
    227         short   idhos4v;                /* oscillator 4 value */
     224        int16_t idhos1v;                /* oscillator 1 value */
     225        int16_t idhos2v;                /* oscillator 2 value */
     226        int16_t idhos3v;                /* oscillator 3 value */
     227        int16_t idhos4v;                /* oscillator 4 value */
    228228
    229229        struct  idfnhdr idhfnc[NFINST]; /* function headers */
     
    231231        struct  instpnt idhpnt[NIPNTS]; /* point table */
    232232
    233         short   idhwvaf[NUMWPNT];       /* waveshape A final values */
    234         short   idhwvao[NUMWPNT];       /* waveshape A offset values */
    235         short   idhwvah[NUMHARM];       /* waveshape A harmonic values */
    236 
    237         short   idhwvbf[NUMWPNT];       /* waveshape B final values */
    238         short   idhwvbo[NUMWPNT];       /* waveshape B offset values */
    239         short   idhwvbh[NUMHARM];       /* waveshape B harmonic values */
    240 
    241 };
     233        int16_t idhwvaf[NUMWPNT];       /* waveshape A final values */
     234        int16_t idhwvao[NUMWPNT];       /* waveshape A offset values */
     235        int16_t idhwvah[NUMHARM];       /* waveshape A harmonic values */
     236
     237        int16_t idhwvbf[NUMWPNT];       /* waveshape B final values */
     238        int16_t idhwvbo[NUMWPNT];       /* waveshape B offset values */
     239        int16_t idhwvbh[NUMHARM];       /* waveshape B harmonic values */
     240
     241};
Note: See TracChangeset for help on using the changeset viewer.