Changeset 7258c6a in buchla-68k for ram/pix2mid.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/pix2mid.c
r0292fbb r7258c6a 17 17 #define PCENTER 256 /* pixel offset of 0 time line */ 18 18 19 extern short cflag; /* accidental flag */20 extern short cnote; /* note value at cursor */21 extern short cyval; /* cursor y value */22 extern short cxval; /* cursor x value */19 extern int16_t cflag; /* accidental flag */ 20 extern int16_t cnote; /* note value at cursor */ 21 extern int16_t cyval; /* cursor y value */ 22 extern int16_t cxval; /* cursor x value */ 23 23 24 extern longctime; /* time at cursor */25 extern longt_cur; /* time at p_cur */24 extern int32_t ctime; /* time at cursor */ 25 extern int32_t t_cur; /* time at p_cur */ 26 26 27 27 /* … … 29 29 */ 30 30 31 short mpixtab[52][4] = { /* pixel to MIDI note for the white keys */31 int16_t mpixtab[52][4] = { /* pixel to MIDI note for the white keys */ 32 32 33 33 /* [0] = center pixel, [1] = MIDI note, [2] = sharp tag, [3] = flat tag */ … … 122 122 */ 123 123 124 short pix2mid(void)124 int16_t pix2mid(void) 125 125 { 126 register short i, cy, mpc;127 register longct;126 register int16_t i, cy, mpc; 127 register int32_t ct; 128 128 129 129 cnote = -1; … … 132 132 mpc = ac_code EQ N_SHARP ? 2 : 3; 133 133 134 ct = t_cur + (( long)cxval - (long)PCENTER);134 ct = t_cur + ((int32_t)cxval - (int32_t)PCENTER); 135 135 136 136 if (ct < 0L)
Note:
See TracChangeset
for help on using the changeset viewer.