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);
|
||||
bool dataRemoveFX(u16 gid);
|
||||
void voiceUnblock(u32 voice);
|
||||
void voiceRemovePriority(const SYNTH_VOICE* svoice);
|
||||
void voiceRemovePriority(SYNTH_VOICE* svoice);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -622,7 +622,8 @@ void sndStreamFree(u32 stid) {
|
|||
|
||||
u32 sndStreamActivate(u32 stid) {
|
||||
u32 i; // r31
|
||||
bool ret = 0; // r28
|
||||
u32 ret; // r28
|
||||
ret = 0;
|
||||
MUSY_ASSERT_MSG(sndActive, "Sound system is not initialized.");
|
||||
hwDisableIrq();
|
||||
i = GetPrivateIndex(stid);
|
||||
|
|
|
@ -751,7 +751,11 @@ static u32 TranslateVolume(u32 volume, u16 curve) {
|
|||
|
||||
if (vhigh < 0x7f) {
|
||||
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);
|
||||
#endif
|
||||
} else {
|
||||
volume = ptr[vhigh] << 16;
|
||||
}
|
||||
|
|
|
@ -194,9 +194,11 @@ static void voiceInitPrioSort() {
|
|||
voicePrioSortRootListRoot = 0xffff;
|
||||
}
|
||||
|
||||
void voiceRemovePriority(const SYNTH_VOICE* svoice) {
|
||||
SYNTH_VOICELIST* vps = &voicePrioSortVoices[svoice->id & 0xFF]; // r31
|
||||
SYNTH_ROOTLIST* rps; // r30
|
||||
void voiceRemovePriority(SYNTH_VOICE* svoice) {
|
||||
SYNTH_VOICELIST* vps; // r31
|
||||
SYNTH_ROOTLIST* rps; // r30
|
||||
|
||||
vps = &voicePrioSortVoices[svoice->id & 0xFF];
|
||||
if (vps->user != 1) {
|
||||
return;
|
||||
}
|
||||
|
@ -294,7 +296,7 @@ void voiceFree(SYNTH_VOICE* svoice) {
|
|||
u32 i; // r29
|
||||
SYNTH_VOICELIST* sfv; // r30
|
||||
i = 1;
|
||||
MUSY_ASSERT(svoice->id!=0xFFFFFFFF);
|
||||
MUSY_ASSERT(svoice->id != 0xFFFFFFFF);
|
||||
macMakeInactive(svoice, MAC_STATE_STOPPED);
|
||||
voiceRemovePriority(svoice);
|
||||
svoice->addr = NULL;
|
||||
|
|
Loading…
Reference in New Issue