Unified · Split
| @@ -66,7 +66,7 @@ extern "C" { · 65 unmodified lines | ||
| 66 | 66 | tMempool mempool; |
| 67 | 67 | // Underlying phasor |
| 68 | 68 | uint32_t phase; |
| 69 | − uint32_t inc; | |
| 69 | + int32_t inc; | |
| 70 | 70 | float freq; |
| 71 | 71 | float invSampleRateTimesTwoTo32; |
| 72 | 72 | uint32_t mask; |
| @@ -137,6 +137,7 @@ int tStack_addIfNotAlreadyThere(tStack* const stack, uint16_t noteVal) · 136 unmodified lines | ||
| 137 | 137 | // Remove noteVal. return 1 if removed, 0 if not |
| 138 | 138 | int tStack_remove(tStack* const stack, uint16_t noteVal) |
| 139 | 139 | { |
| 140 | + | |
| 140 | 141 | _tStack* ns = *stack; |
| 141 | 142 | |
| 142 | 143 | uint8_t k; |
| @@ -801,7 +802,7 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 658 unmodified lines | ||
| 801 | 802 | //grab old notes off the stack if there are notes waiting to replace the free voice |
| 802 | 803 | for (int j = 0; j < tStack_getSize(&poly->stack); ++j) |
| 803 | 804 | { |
| 804 | − noteToTest = tStack_get(&poly->stack, j); | |
| 805 | + noteToTest = tStack_get(&poly->stack, j); //note to check if it is waiting to be recovered | |
| 805 | 806 | |
| 806 | 807 | if (poly->notes[noteToTest][0] == -3) //if there is a stolen note waiting (marked inactive but on the stack) |
| 807 | 808 | { |
| @@ -809,6 +810,8 @@ void tSimplePoly_deactivateVoice(tSimplePoly* const polyh, uint8_t voice) · 1 unmodified line | ||
| 809 | 810 | poly->voices[voice][1] = poly->notes[noteToTest][1]; // set the velocity of the voice to be the velocity of that note |
| 810 | 811 | poly->voices[voice][2] = noteToTest; |
| 811 | 812 | poly->notes[noteToTest][0] = voice; //mark that it is no longer stolen and is now active |
| 813 | + //poly->notes[][0] = -1; | |
| 814 | + break; | |
| 812 | 815 | } |
| 813 | 816 | } |
| 814 | 817 | } |