forked from Ports/perfect_dark
port: don't doubleswap envelope data
this fixes music running out of free channels
This commit is contained in:
1 parent
18bab30c59
commit
60e64e1a1d
1 file changed
+6
-4
@@ -98,10 +98,12 @@ static inline void preprocessALSound(ALSound *snd, u8 *bankBase)
|
|||||||
|
|
||||||
if (snd->envelope) {
|
if (snd->envelope) {
|
||||||
PD_SWAP_PTR(snd->envelope);
|
PD_SWAP_PTR(snd->envelope);
|
||||||
ALEnvelope *env = PD_PTR_BASE(snd->envelope, bankBase);
|
if (!alreadySwapped((intptr_t)snd->envelope)) {
|
||||||
PD_SWAP_VAL(env->attackTime);
|
ALEnvelope *env = PD_PTR_BASE(snd->envelope, bankBase);
|
||||||
PD_SWAP_VAL(env->releaseTime);
|
PD_SWAP_VAL(env->attackTime);
|
||||||
PD_SWAP_VAL(env->decayTime);
|
PD_SWAP_VAL(env->releaseTime);
|
||||||
|
PD_SWAP_VAL(env->decayTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (snd->keyMap) {
|
if (snd->keyMap) {
|
||||||
|
|||||||
Reference in new issue
Block a user