| @@ -850,7 +850,7 @@ float tADSR3_tick(tADSR3* const adsrenv) · 849 unmodified lines |
| 850 | // use this if the size of the big ADSR tables is too much. | 850 | // use this if the size of the big ADSR tables is too much. |
| 851 | void tADSR4_init (tADSR4* const adsrenv, float attack, float decay, float sustain, float release, float* expBuffer, int bufferSize) | 851 | void tADSR4_init (tADSR4* const adsrenv, float attack, float decay, float sustain, float release, float* expBuffer, int bufferSize) |
| 852 | { | 852 | { |
| 853 | tADSR4_initToPool (adsrenv, attack, decay, sustain, release, expBuffer, bufferSize, &leaf.mempool); | 853 | tADSR4_initToPool (adsrenv, attack, decay, sustain, release, expBuffer, bufferSize, &leaf.mempool); |
| 854 | } | 854 | } |
| 855 | | 855 | |
| 856 | void tADSR4_free(tADSR4* const adsrenv) | 856 | void tADSR4_free(tADSR4* const adsrenv) |
| @@ -887,11 +887,7 @@ void tADSR4_initToPool (tADSR4* const adsrenv, float attack, float decay, · 30 unmodified lines |
| 887 | | 887 | |
| 888 | adsr->next = 0.0f; | 888 | adsr->next = 0.0f; |
| 889 | | 889 | |
| 890 | adsr->inRamp = OFALSE; | 890 | adsr->whichStage = env_idle; |
| 891 | adsr->inAttack = OFALSE; | | |
| 892 | adsr->inDecay = OFALSE; | | |
| 893 | adsr->inSustain = OFALSE; | | |
| 894 | adsr->inRelease = OFALSE; | | |
| 895 | | 891 | |
| 896 | adsr->sustain = sustain; | 892 | adsr->sustain = sustain; |
| 897 | | 893 | |
| @@ -916,7 +912,7 @@ void tADSR4_setAttack(tADSR4* const adsrenv, float attack) · 18 unmodified lines |
| 916 | | 912 | |
| 917 | if (attack < 0.0f) | 913 | if (attack < 0.0f) |
| 918 | { | 914 | { |
| 919 | attack = 0.0f; | 915 | attack = 0.0f; |
| 920 | } | 916 | } |
| 921 | | 917 | |
| 922 | adsr->attackInc = adsr->bufferSizeDividedBySampleRateInMs / attack; | 918 | adsr->attackInc = adsr->bufferSizeDividedBySampleRateInMs / attack; |
| @@ -928,7 +924,7 @@ void tADSR4_setDecay(tADSR4* const adsrenv, float decay) · 5 unmodified lines |
| 928 | | 924 | |
| 929 | if (decay < 0.0f) | 925 | if (decay < 0.0f) |
| 930 | { | 926 | { |
| 931 | decay = 0.0f; | 927 | decay = 0.0f; |
| 932 | } | 928 | } |
| 933 | adsr->decayInc = adsr->bufferSizeDividedBySampleRateInMs / decay; | 929 | adsr->decayInc = adsr->bufferSizeDividedBySampleRateInMs / decay; |
| 934 | } | 930 | } |
| @@ -948,7 +944,7 @@ void tADSR4_setRelease(tADSR4* const adsrenv, float release) · 13 unmodified lines |
| 948 | | 944 | |
| 949 | if (release < 0.0f) | 945 | if (release < 0.0f) |
| 950 | { | 946 | { |
| 951 | release = 0.0f; | 947 | release = 0.0f; |
| 952 | } | 948 | } |
| 953 | adsr->releaseInc = adsr->bufferSizeDividedBySampleRateInMs / release; | 949 | adsr->releaseInc = adsr->bufferSizeDividedBySampleRateInMs / release; |
| 954 | } | 950 | } |
| @@ -966,23 +962,20 @@ void tADSR4_on(tADSR4* const adsrenv, float velocity) · 11 unmodified lines |
| 966 | { | 962 | { |
| 967 | _tADSR4* adsr = *adsrenv; | 963 | _tADSR4* adsr = *adsrenv; |
| 968 | | 964 | |
| 969 | if ((adsr->inAttack || adsr->inDecay) || (adsr->inSustain || adsr->inRelease)) // In case ADSR retriggered while it is still happening. | 965 | if (adsr->whichStage != env_idle) // In case ADSR retriggered while it is still happening. |
| 970 | { | 966 | { |
| 971 | adsr->rampPhase = 0; | 967 | adsr->rampPhase = 0; |
| 972 | adsr->inRamp = OTRUE; | 968 | adsr->whichStage = env_ramp; |
| 973 | adsr->rampPeak = adsr->next; | 969 | adsr->rampPeak = adsr->next; |
| 974 | } | 970 | } |
| 975 | else // Normal start. | 971 | else // Normal start. |
| 976 | { | 972 | { |
| 977 | adsr->inAttack = OTRUE; | 973 | adsr->whichStage = env_attack; |
| 978 | } | 974 | } |
| 979 | | 975 | |
| 980 | adsr->attackPhase = 0; | 976 | adsr->attackPhase = 0; |
| 981 | adsr->decayPhase = 0; | 977 | adsr->decayPhase = 0; |
| 982 | adsr->releasePhase = 0; | 978 | adsr->releasePhase = 0; |
| 983 | adsr->inDecay = OFALSE; | | |
| 984 | adsr->inSustain = OFALSE; | | |
| 985 | adsr->inRelease = OFALSE; | | |
| 986 | adsr->gain = velocity; | 979 | adsr->gain = velocity; |
| 987 | } | 980 | } |
| 988 | | 981 | |
| @@ -990,146 +983,139 @@ void tADSR4_off(tADSR4* const adsrenv) · 1 unmodified line |
| 990 | { | 983 | { |
| 991 | _tADSR4* adsr = *adsrenv; | 984 | _tADSR4* adsr = *adsrenv; |
| 992 | | 985 | |
| 993 | if (adsr->inRelease) return; | 986 | if (adsr->whichStage == env_idle) |
| 994 | | 987 | { |
| 995 | adsr->inAttack = OFALSE; | 988 | return; |
| 996 | adsr->inDecay = OFALSE; | 989 | } |
| 997 | adsr->inSustain = OFALSE; | 990 | else |
| 998 | adsr->inRelease = OTRUE; | 991 | { |
| 999 | | 992 | adsr->whichStage = env_release; |
| 1000 | adsr->releasePeak = adsr->next; | 993 | adsr->releasePeak = adsr->next; |
| | 994 | } |
| 1001 | } | 995 | } |
| 1002 | | 996 | |
| 1003 | float tADSR4_tick(tADSR4* const adsrenv) | 997 | float tADSR4_tick(tADSR4* const adsrenv) |
| 1004 | { | 998 | { |
| 1005 | _tADSR4* adsr = *adsrenv; | 999 | _tADSR4* adsr = *adsrenv; |
| 1006 | | 1000 | |
| 1007 | | 1001 | switch (adsr->whichStage) |
| 1008 | if (adsr->inRamp) | | |
| 1009 | { | 1002 | { |
| 1010 | if (adsr->rampPhase > adsr->buff_sizeMinusOne) | 1003 | case env_ramp: |
| 1011 | { | 1004 | if (adsr->rampPhase > adsr->buff_sizeMinusOne) |
| 1012 | adsr->inRamp = OFALSE; | 1005 | { |
| 1013 | adsr->inAttack = OTRUE; | 1006 | adsr->whichStage = env_attack; |
| 1014 | adsr->next = 0.0f; | 1007 | adsr->next = 0.0f; |
| 1015 | } | 1008 | } |
| 1016 | else | 1009 | else |
| 1017 | { | 1010 | { |
| 1018 | uint32_t intPart = (uint32_t)adsr->rampPhase; | 1011 | uint32_t intPart = (uint32_t)adsr->rampPhase; |
| 1019 | float floatPart = adsr->rampPhase - intPart; | 1012 | float floatPart = adsr->rampPhase - intPart; |
| 1020 | float secondValue; | 1013 | float secondValue; |
| 1021 | if (adsr->rampPhase + 1.0f > adsr->buff_sizeMinusOne) | 1014 | if (adsr->rampPhase + 1.0f > adsr->buff_sizeMinusOne) |
| 1022 | { | 1015 | { |
| 1023 | secondValue = 0.0f; | 1016 | secondValue = 0.0f; |
| 1024 | } | 1017 | } |
| 1025 | else | 1018 | else |
| 1026 | { | 1019 | { |
| 1027 | secondValue = adsr->exp_buff[(uint32_t)((adsr->rampPhase)+1)]; | 1020 | secondValue = adsr->exp_buff[(uint32_t)((adsr->rampPhase)+1)]; |
| 1028 | } | 1021 | } |
| 1029 | adsr->next = adsr->rampPeak * LEAF_interpolation_linear(adsr->exp_buff[(uint32_t)(adsr->rampPhase)], secondValue, floatPart); | 1022 | adsr->next = adsr->rampPeak * LEAF_interpolation_linear(adsr->exp_buff[intPart], secondValue, floatPart); |
| 1030 | } | 1023 | } |
| 1031 | | 1024 | |
| 1032 | adsr->rampPhase += adsr->rampInc; | 1025 | adsr->rampPhase += adsr->rampInc; |
| 1033 | } | 1026 | break; |
| 1034 | | 1027 | |
| 1035 | if (adsr->inAttack) | | |
| 1036 | { | | |
| 1037 | | 1028 | |
| 1038 | // If attack done, time to turn around. | 1029 | case env_attack: |
| 1039 | if (adsr->attackPhase > adsr->buff_sizeMinusOne) | | |
| 1040 | { | | |
| 1041 | adsr->inDecay = OTRUE; | | |
| 1042 | adsr->inAttack = OFALSE; | | |
| 1043 | adsr->next = adsr->gain; | | |
| 1044 | } | | |
| 1045 | else | | |
| 1046 | { | | |
| 1047 | // do interpolation ! | | |
| 1048 | uint32_t intPart = (uint32_t)adsr->attackPhase; | | |
| 1049 | float floatPart = adsr->attackPhase - intPart; | | |
| 1050 | float secondValue; | | |
| 1051 | if (adsr->attackPhase + 1.0f > adsr->buff_sizeMinusOne) | | |
| 1052 | { | | |
| 1053 | secondValue = 0.0f; | | |
| 1054 | } | | |
| 1055 | else | | |
| 1056 | { | | |
| 1057 | secondValue = adsr->exp_buff[(uint32_t)((adsr->attackPhase)+1)]; | | |
| 1058 | } | | |
| 1059 | | | |
| 1060 | adsr->next = adsr->gain * (1.0f - LEAF_interpolation_linear(adsr->exp_buff[(uint32_t)(adsr->attackPhase)], secondValue, floatPart)); // inverted and backwards to get proper rising exponential shape/perception | | |
| 1061 | } | | |
| 1062 | | 1030 | |
| 1063 | // Increment ADSR attack. | 1031 | // If attack done, time to turn around. |
| 1064 | adsr->attackPhase += adsr->attackInc; | 1032 | if (adsr->attackPhase > adsr->buff_sizeMinusOne) |
| | 1033 | { |
| | 1034 | adsr->whichStage = env_decay; |
| | 1035 | adsr->next = adsr->gain; |
| | 1036 | } |
| | 1037 | else |
| | 1038 | { |
| | 1039 | // do interpolation ! |
| | 1040 | uint32_t intPart = (uint32_t)adsr->attackPhase; |
| | 1041 | float floatPart = adsr->attackPhase - intPart; |
| | 1042 | float secondValue; |
| | 1043 | if (adsr->attackPhase + 1.0f > adsr->buff_sizeMinusOne) |
| | 1044 | { |
| | 1045 | secondValue = 0.0f; |
| | 1046 | } |
| | 1047 | else |
| | 1048 | { |
| | 1049 | secondValue = adsr->exp_buff[(uint32_t)((adsr->attackPhase)+1)]; |
| | 1050 | } |
| | 1051 | |
| | 1052 | adsr->next = adsr->gain * (1.0f - LEAF_interpolation_linear(adsr->exp_buff[intPart], secondValue, floatPart)); // inverted and backwards to get proper rising exponential shape/perception |
| | 1053 | } |
| 1065 | | 1054 | |
| 1066 | } | 1055 | // Increment ADSR attack. |
| | 1056 | adsr->attackPhase += adsr->attackInc; |
| | 1057 | break; |
| 1067 | | 1058 | |
| 1068 | if (adsr->inDecay) | 1059 | case env_decay: |
| 1069 | { | | |
| 1070 | | 1060 | |
| 1071 | // If decay done, sustain. | 1061 | // If decay done, sustain. |
| 1072 | if (adsr->decayPhase > adsr->buff_sizeMinusOne) | 1062 | if (adsr->decayPhase > adsr->buff_sizeMinusOne) |
| 1073 | { | 1063 | { |
| 1074 | adsr->inDecay = OFALSE; | 1064 | adsr->whichStage = env_sustain; |
| 1075 | adsr->inSustain = OTRUE; | 1065 | adsr->next = adsr->gain * adsr->sustain; |
| 1076 | adsr->next = adsr->gain * adsr->sustain; | 1066 | } |
| 1077 | } | | |
| 1078 | | 1067 | |
| 1079 | else | 1068 | else |
| 1080 | { | 1069 | { |
| 1081 | uint32_t intPart = (uint32_t)adsr->decayPhase; | 1070 | uint32_t intPart = (uint32_t)adsr->decayPhase; |
| 1082 | float floatPart = adsr->decayPhase - intPart; | 1071 | float floatPart = adsr->decayPhase - intPart; |
| 1083 | float secondValue; | 1072 | float secondValue; |
| 1084 | if (adsr->decayPhase + 1.0f > adsr->buff_sizeMinusOne) | 1073 | if (adsr->decayPhase + 1.0f > adsr->buff_sizeMinusOne) |
| 1085 | { | 1074 | { |
| 1086 | secondValue = 0.0f; | 1075 | secondValue = 0.0f; |
| 1087 | } | 1076 | } |
| 1088 | else | 1077 | else |
| 1089 | { | 1078 | { |
| 1090 | secondValue = adsr->exp_buff[(uint32_t)((adsr->decayPhase)+1)]; | 1079 | secondValue = adsr->exp_buff[(uint32_t)((adsr->decayPhase)+1)]; |
| 1091 | } | 1080 | } |
| 1092 | float interpValue = (LEAF_interpolation_linear(adsr->exp_buff[(uint32_t)(adsr->decayPhase)], secondValue, floatPart)); | 1081 | float interpValue = (LEAF_interpolation_linear(adsr->exp_buff[intPart], secondValue, floatPart)); |
| 1093 | adsr->next = (adsr->gain * (adsr->sustain + (interpValue * (1.0f - adsr->sustain)))) * adsr->leakFactor; // do interpolation ! | 1082 | adsr->next = (adsr->gain * (adsr->sustain + (interpValue * (1.0f - adsr->sustain)))) * adsr->leakFactor; // do interpolation ! |
| 1094 | } | 1083 | } |
| 1095 | | 1084 | |
| 1096 | // Increment ADSR decay. | 1085 | // Increment ADSR decay. |
| 1097 | adsr->decayPhase += adsr->decayInc; | 1086 | adsr->decayPhase += adsr->decayInc; |
| 1098 | } | 1087 | break; |
| 1099 | | 1088 | |
| 1100 | if (adsr->inSustain) | 1089 | case env_sustain: |
| 1101 | { | 1090 | adsr->next = adsr->next * adsr->leakFactor; |
| 1102 | adsr->next = adsr->next * adsr->leakFactor; | 1091 | break; |
| 1103 | } | | |
| 1104 | | 1092 | |
| 1105 | if (adsr->inRelease) | 1093 | case env_release: |
| 1106 | { | 1094 | // If release done, finish. |
| 1107 | // If release done, finish. | 1095 | if (adsr->releasePhase > adsr->buff_sizeMinusOne) |
| 1108 | if (adsr->releasePhase > adsr->buff_sizeMinusOne) | 1096 | { |
| 1109 | { | 1097 | adsr->whichStage = env_idle; |
| 1110 | adsr->inRelease = OFALSE; | 1098 | adsr->next = 0.0f; |
| 1111 | adsr->next = 0.0f; | 1099 | } |
| 1112 | } | 1100 | else { |
| 1113 | else { | 1101 | uint32_t intPart = (uint32_t)adsr->releasePhase; |
| 1114 | uint32_t intPart = (uint32_t)adsr->releasePhase; | 1102 | float floatPart = adsr->releasePhase - intPart; |
| 1115 | float floatPart = adsr->releasePhase - intPart; | 1103 | float secondValue; |
| 1116 | float secondValue; | 1104 | if (adsr->releasePhase + 1.0f > adsr->buff_sizeMinusOne) |
| 1117 | if (adsr->releasePhase + 1.0f > adsr->buff_sizeMinusOne) | 1105 | { |
| 1118 | { | 1106 | secondValue = 0.0f; |
| 1119 | secondValue = 0.0f; | 1107 | } |
| 1120 | } | 1108 | else |
| 1121 | else | 1109 | { |
| 1122 | { | 1110 | secondValue = adsr->exp_buff[(uint32_t)((adsr->releasePhase)+1)]; |
| 1123 | secondValue = adsr->exp_buff[(uint32_t)((adsr->releasePhase)+1)]; | 1111 | } |
| 1124 | } | 1112 | adsr->next = adsr->releasePeak * (LEAF_interpolation_linear(adsr->exp_buff[intPart], secondValue, floatPart)); // do interpolation ! |
| 1125 | adsr->next = adsr->releasePeak * (LEAF_interpolation_linear(adsr->exp_buff[(uint32_t)(adsr->releasePhase)], secondValue, floatPart)); // do interpolation ! | 1113 | } |
| 1126 | } | | |
| 1127 | | 1114 | |
| 1128 | // Increment envelope release; | 1115 | // Increment envelope release; |
| 1129 | adsr->releasePhase += adsr->releaseInc; | 1116 | adsr->releasePhase += adsr->releaseInc; |
| | 1117 | break; |
| 1130 | } | 1118 | } |
| 1131 | | | |
| 1132 | | | |
| 1133 | return adsr->next; | 1119 | return adsr->next; |
| 1134 | } | 1120 | } |
| 1135 | | 1121 | |
| @@ -1137,87 +1123,77 @@ float tADSR4_tickNoInterp(tADSR4* const adsrenv) · 1 unmodified line |
| 1137 | { | 1123 | { |
| 1138 | _tADSR4* adsr = *adsrenv; | 1124 | _tADSR4* adsr = *adsrenv; |
| 1139 | | 1125 | |
| 1140 | | 1126 | switch (adsr->whichStage) |
| 1141 | if (adsr->inRamp) | | |
| 1142 | { | 1127 | { |
| 1143 | if (adsr->rampPhase > adsr->buff_sizeMinusOne) | 1128 | case env_ramp: |
| 1144 | { | 1129 | if (adsr->rampPhase > adsr->buff_sizeMinusOne) |
| 1145 | adsr->inRamp = OFALSE; | 1130 | { |
| 1146 | adsr->inAttack = OTRUE; | 1131 | adsr->whichStage = env_attack; |
| 1147 | adsr->next = 0.0f; | 1132 | adsr->next = 0.0f; |
| 1148 | } | 1133 | } |
| 1149 | else | 1134 | else |
| 1150 | { | 1135 | { |
| 1151 | adsr->next = adsr->rampPeak * adsr->exp_buff[(uint32_t)(adsr->rampPhase)]; | 1136 | adsr->next = adsr->rampPeak * adsr->exp_buff[(uint32_t)adsr->rampPhase]; |
| 1152 | } | 1137 | } |
| 1153 | | | |
| 1154 | adsr->rampPhase += adsr->rampInc; | | |
| 1155 | } | | |
| 1156 | | 1138 | |
| 1157 | if (adsr->inAttack) | 1139 | adsr->rampPhase += adsr->rampInc; |
| 1158 | { | 1140 | break; |
| 1159 | | 1141 | |
| 1160 | // If attack done, time to turn around. | | |
| 1161 | if (adsr->attackPhase > adsr->buff_sizeMinusOne) | | |
| 1162 | { | | |
| 1163 | adsr->inDecay = OTRUE; | | |
| 1164 | adsr->inAttack = OFALSE; | | |
| 1165 | adsr->next = adsr->gain; | | |
| 1166 | } | | |
| 1167 | else | | |
| 1168 | { | | |
| 1169 | // do interpolation ! | | |
| 1170 | adsr->next = adsr->gain * (1.0f - adsr->exp_buff[(uint32_t)(adsr->attackPhase)]); // inverted and backwards to get proper rising exponential shape/perception | | |
| 1171 | } | | |
| 1172 | | 1142 | |
| 1173 | // Increment ADSR attack. | 1143 | case env_attack: |
| 1174 | adsr->attackPhase += adsr->attackInc; | | |
| 1175 | | 1144 | |
| 1176 | } | 1145 | // If attack done, time to turn around. |
| | 1146 | if (adsr->attackPhase > adsr->buff_sizeMinusOne) |
| | 1147 | { |
| | 1148 | adsr->whichStage = env_decay; |
| | 1149 | adsr->next = adsr->gain; |
| | 1150 | } |
| | 1151 | else |
| | 1152 | { |
| | 1153 | adsr->next = adsr->gain * (1.0f - adsr->exp_buff[(uint32_t)adsr->attackPhase]); // inverted and backwards to get proper rising exponential shape/perception |
| | 1154 | } |
| 1177 | | 1155 | |
| 1178 | if (adsr->inDecay) | 1156 | // Increment ADSR attack. |
| 1179 | { | 1157 | adsr->attackPhase += adsr->attackInc; |
| | 1158 | break; |
| 1180 | | 1159 | |
| 1181 | // If decay done, sustain. | 1160 | case env_decay: |
| 1182 | if (adsr->decayPhase > adsr->buff_sizeMinusOne) | | |
| 1183 | { | | |
| 1184 | adsr->inDecay = OFALSE; | | |
| 1185 | adsr->inSustain = OTRUE; | | |
| 1186 | adsr->next = adsr->gain * adsr->sustain; | | |
| 1187 | } | | |
| 1188 | | 1161 | |
| 1189 | else | 1162 | // If decay done, sustain. |
| 1190 | { | 1163 | if (adsr->decayPhase > adsr->buff_sizeMinusOne) |
| 1191 | adsr->next = (adsr->gain * (adsr->sustain + ((adsr->exp_buff[(uint32_t)(adsr->decayPhase)]) * (1.0f - adsr->sustain)))) * adsr->leakFactor; // do interpolation ! | 1164 | { |
| 1192 | } | 1165 | adsr->whichStage = env_sustain; |
| | 1166 | adsr->next = adsr->gain * adsr->sustain; |
| | 1167 | } |
| 1193 | | 1168 | |
| 1194 | // Increment ADSR decay. | 1169 | else |
| 1195 | adsr->decayPhase += adsr->decayInc; | 1170 | { |
| 1196 | } | 1171 | adsr->next = (adsr->gain * (adsr->sustain + (adsr->exp_buff[(uint32_t)adsr->decayPhase] * (1.0f - adsr->sustain)))) * adsr->leakFactor; |
| | 1172 | } |
| 1197 | | 1173 | |
| 1198 | if (adsr->inSustain) | 1174 | // Increment ADSR decay. |
| 1199 | { | 1175 | adsr->decayPhase += adsr->decayInc; |
| 1200 | adsr->next = adsr->next * adsr->leakFactor; | 1176 | break; |
| 1201 | } | | |
| 1202 | | 1177 | |
| 1203 | if (adsr->inRelease) | 1178 | case env_sustain: |
| 1204 | { | 1179 | adsr->next = adsr->next * adsr->leakFactor; |
| 1205 | // If release done, finish. | 1180 | break; |
| 1206 | if (adsr->releasePhase > adsr->buff_sizeMinusOne) | | |
| 1207 | { | | |
| 1208 | adsr->inRelease = OFALSE; | | |
| 1209 | adsr->next = 0.0f; | | |
| 1210 | } | | |
| 1211 | else { | | |
| 1212 | | 1181 | |
| 1213 | adsr->next = adsr->releasePeak * (adsr->exp_buff[(uint32_t)(adsr->releasePhase)]); // do interpolation ! | 1182 | case env_release: |
| 1214 | } | 1183 | // If release done, finish. |
| | 1184 | if (adsr->releasePhase > adsr->buff_sizeMinusOne) |
| | 1185 | { |
| | 1186 | adsr->whichStage = env_idle; |
| | 1187 | adsr->next = 0.0f; |
| | 1188 | } |
| | 1189 | else { |
| | 1190 | adsr->next = adsr->releasePeak * adsr->exp_buff[(uint32_t)adsr->releasePhase]; |
| | 1191 | } |
| 1215 | | 1192 | |
| 1216 | // Increment envelope release; | 1193 | // Increment envelope release; |
| 1217 | adsr->releasePhase += adsr->releaseInc; | 1194 | adsr->releasePhase += adsr->releaseInc; |
| | 1195 | break; |
| 1218 | } | 1196 | } |
| 1219 | | | |
| 1220 | | | |
| 1221 | return adsr->next; | 1197 | return adsr->next; |
| 1222 | } | 1198 | } |
| 1223 | | 1199 | |