You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Allow envelopes with delay values of 0 on init (#625)
This allows sounds to start instantly without any fade-in. Using new soundbanks with delay values of 0 will not compile with base decomp, but old decomp-compliant soundbanks will work with this commit.
This commit is contained in:
@@ -428,8 +428,9 @@ s32 adsr_update(struct Note *note) {
|
||||
adsr->target = adsr->target * adsr->target;
|
||||
adsr->velocity = (adsr->target - adsr->current) / adsr->delay;
|
||||
#else // !(VERSION_EU || VERSION_SH)
|
||||
if (isInit && adsr->delay <= 1) {
|
||||
note->initFullVelocity = TRUE;
|
||||
if (adsr->delay <= 0) {
|
||||
adsr->delay = 1;
|
||||
note->initFullVelocity = isInit;
|
||||
}
|
||||
|
||||
adsr->target = BSWAP16(adsr->envelope[adsr->envIndex].arg);
|
||||
|
||||
@@ -26,10 +26,10 @@ enum ADSRActions {
|
||||
};
|
||||
|
||||
enum ADSRDelays {
|
||||
ADSR_DISABLE = 0,
|
||||
ADSR_HANG = -1,
|
||||
ADSR_GOTO = -2,
|
||||
ADSR_RESTART = -3,
|
||||
ADSR_DISABLE = -4,
|
||||
};
|
||||
|
||||
enum VibratoModes {
|
||||
|
||||
Reference in New Issue
Block a user