mirror of https://github.com/PrimeDecomp/prime.git
Minor MusyX fixes
Former-commit-id: 1432f381d9a3cf2c2d8650a659de4c339f7b4a97
This commit is contained in:
parent
be56c93593
commit
092ae46a4c
|
@ -52,7 +52,7 @@ u8 synthFXGetMaxVoices(u16 fid);
|
||||||
void synthPauseVolume(u8 volume, u16 time, u8 vGroup);
|
void synthPauseVolume(u8 volume, u16 time, u8 vGroup);
|
||||||
bool dataRemoveFX(u16 gid);
|
bool dataRemoveFX(u16 gid);
|
||||||
void voiceUnblock(u32 voice);
|
void voiceUnblock(u32 voice);
|
||||||
void voiceRemovePriority(const SYNTH_VOICE* svoice);
|
void voiceRemovePriority(SYNTH_VOICE* svoice);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -622,7 +622,8 @@ void sndStreamFree(u32 stid) {
|
||||||
|
|
||||||
u32 sndStreamActivate(u32 stid) {
|
u32 sndStreamActivate(u32 stid) {
|
||||||
u32 i; // r31
|
u32 i; // r31
|
||||||
bool ret = 0; // r28
|
u32 ret; // r28
|
||||||
|
ret = 0;
|
||||||
MUSY_ASSERT_MSG(sndActive, "Sound system is not initialized.");
|
MUSY_ASSERT_MSG(sndActive, "Sound system is not initialized.");
|
||||||
hwDisableIrq();
|
hwDisableIrq();
|
||||||
i = GetPrivateIndex(stid);
|
i = GetPrivateIndex(stid);
|
||||||
|
|
|
@ -751,7 +751,11 @@ static u32 TranslateVolume(u32 volume, u16 curve) {
|
||||||
|
|
||||||
if (vhigh < 0x7f) {
|
if (vhigh < 0x7f) {
|
||||||
d = vlow * (ptr[vhigh + 1] - ptr[vhigh]);
|
d = vlow * (ptr[vhigh + 1] - ptr[vhigh]);
|
||||||
|
#if MUSY_VERSION >= MUSY_VERSION_CHECK(2, 0, 0)
|
||||||
|
volume = d + ((u16)ptr[vhigh] << 16);
|
||||||
|
#else
|
||||||
volume = d + (ptr[vhigh] << 16);
|
volume = d + (ptr[vhigh] << 16);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
volume = ptr[vhigh] << 16;
|
volume = ptr[vhigh] << 16;
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,9 +194,11 @@ static void voiceInitPrioSort() {
|
||||||
voicePrioSortRootListRoot = 0xffff;
|
voicePrioSortRootListRoot = 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
void voiceRemovePriority(const SYNTH_VOICE* svoice) {
|
void voiceRemovePriority(SYNTH_VOICE* svoice) {
|
||||||
SYNTH_VOICELIST* vps = &voicePrioSortVoices[svoice->id & 0xFF]; // r31
|
SYNTH_VOICELIST* vps; // r31
|
||||||
SYNTH_ROOTLIST* rps; // r30
|
SYNTH_ROOTLIST* rps; // r30
|
||||||
|
|
||||||
|
vps = &voicePrioSortVoices[svoice->id & 0xFF];
|
||||||
if (vps->user != 1) {
|
if (vps->user != 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +296,7 @@ void voiceFree(SYNTH_VOICE* svoice) {
|
||||||
u32 i; // r29
|
u32 i; // r29
|
||||||
SYNTH_VOICELIST* sfv; // r30
|
SYNTH_VOICELIST* sfv; // r30
|
||||||
i = 1;
|
i = 1;
|
||||||
MUSY_ASSERT(svoice->id!=0xFFFFFFFF);
|
MUSY_ASSERT(svoice->id != 0xFFFFFFFF);
|
||||||
macMakeInactive(svoice, MAC_STATE_STOPPED);
|
macMakeInactive(svoice, MAC_STATE_STOPPED);
|
||||||
voiceRemovePriority(svoice);
|
voiceRemovePriority(svoice);
|
||||||
svoice->addr = NULL;
|
svoice->addr = NULL;
|
||||||
|
|
Loading…
Reference in New Issue