Z2AudioLib debug (#3016)

This commit is contained in:
Jcw87
2026-01-05 03:54:00 -08:00
committed by GitHub
parent 1d2a0d9568
commit 767e3ba17e
14 changed files with 790 additions and 714 deletions
+1
View File
@@ -13,6 +13,7 @@ struct JASSoundParams;
*/ */
struct JASNonCopyable { struct JASNonCopyable {
JASNonCopyable() {} JASNonCopyable() {}
~JASNonCopyable() {}
/* 0x0 */ int field_0x0; /* 0x0 */ int field_0x0;
}; // Size: 0x4 }; // Size: 0x4
+1 -1
View File
@@ -349,7 +349,7 @@ public:
return audible_ != NULL; return audible_ != NULL;
} }
JAISoundFader& getFader() { return fader_; } JAISoundFader* getFader() const { return (JAISoundFader*)&fader_; }
void fadeIn(u32 maxSteps) { fader_.fadeInFromOut(maxSteps); } void fadeIn(u32 maxSteps) { fader_.fadeInFromOut(maxSteps); }
void fadeOut(u32 maxSteps) { fader_.fadeOut(maxSteps); } void fadeOut(u32 maxSteps) { fader_.fadeOut(maxSteps); }
+8
View File
@@ -47,6 +47,10 @@ struct Z2Param {
static u8 BGM_CROSS_FADEOUT_TIME; static u8 BGM_CROSS_FADEOUT_TIME;
static u8 BATTLE_BGM_WAIT_TIME; static u8 BATTLE_BGM_WAIT_TIME;
static f32 ENEMY_NEARBY_DIST;
static f32 BATTLE_FADEIN_DIST;
static f32 BATTLE_FADEOUT_DIST;
static u8 FOUND_TRACK_FI_TIME; static u8 FOUND_TRACK_FI_TIME;
static u8 FOUND_TRACK_FO_TIME; static u8 FOUND_TRACK_FO_TIME;
static u8 CLOSE_BATTLE_TRACK_FI_TIME; static u8 CLOSE_BATTLE_TRACK_FI_TIME;
@@ -60,6 +64,10 @@ struct Z2Param {
static u8 DARK_SE_FILTER_ON; static u8 DARK_SE_FILTER_ON;
static u8 DARK_SE_LOW_PASS_FILTER_SETTING; static u8 DARK_SE_LOW_PASS_FILTER_SETTING;
static u8 SYSTEM_SE_USE_DARK_SE_SETTING; static u8 SYSTEM_SE_USE_DARK_SE_SETTING;
static f32 AUDIBLE_DELTA_RANGE_VOLUME;
static f32 AUDIBLE_DELTA_RANGE_PAN;
static f32 AUDIBLE_DELTA_RANGE_DOLBY;
}; };
extern u8 data_8045086C; extern u8 data_8045086C;
+3 -7
View File
@@ -45,7 +45,7 @@ struct Z2SoundFader {
fadeIn(fadeTime); fadeIn(fadeTime);
} }
u32 getCount() { u32 getCount() const {
return transition_.remainingSteps_; return transition_.remainingSteps_;
} }
@@ -53,12 +53,8 @@ struct Z2SoundFader {
return intensity_; return intensity_;
} }
f32 getDest() { f32 getDest() const {
if (getCount() != 0) { return getCount() != 0 ? transition_.targetValue_ : getIntensity();
return transition_.targetValue_;
} else {
return intensity_;
}
} }
void calc() { void calc() {
+6
View File
@@ -9,6 +9,12 @@ u16 seqCallback(JASTrack* track, u16 command);
class Z2SoundMgr : public JASGlobalInstance<Z2SoundMgr> { class Z2SoundMgr : public JASGlobalInstance<Z2SoundMgr> {
public: public:
#if PLATFORM_GCN
static const int MAX_CATEGORIES = 9;
#else
static const int MAX_CATEGORIES = 10;
#endif
Z2SoundMgr(); Z2SoundMgr();
void calc(); void calc();
void setIIR(JAISound* sound, const s16* iir); void setIIR(JAISound* sound, const s16* iir);
+1 -1
View File
@@ -96,7 +96,7 @@ public:
u8 isTwilightBattle(); u8 isTwilightBattle();
u8 getEnemyNumNear() const { return enemuNumNear_; } u8 getEnemyNumNear() const { return enemuNumNear_; }
u8 getEnemyNumVeryFar() { return enemuNumVeryFar_; } u8 getEnemyNumVeryFar() const { return enemuNumVeryFar_; }
bool isForceBattle() { return forceBattle_; } bool isForceBattle() { return forceBattle_; }
JSUList<Z2CreatureEnemy>* getEnemyList() { return this; } JSUList<Z2CreatureEnemy>* getEnemyList() { return this; }
+1 -1
View File
@@ -37,7 +37,7 @@ struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
/* 0x01 */ u8 mMinute; /* 0x01 */ u8 mMinute;
/* 0x02 */ u8 mWeekday; /* 0x02 */ u8 mWeekday;
/* 0x03 */ u8 field_0x03; /* 0x03 */ u8 field_0x03;
/* 0x04 */ s16 mTime; /* 0x04 */ u16 mTime;
/* 0x08 */ void* mEventBit; /* 0x08 */ void* mEventBit;
/* 0x0C */ u8 mPauseFlag; /* 0x0C */ u8 mPauseFlag;
/* 0x10 */ u32 mCameraMapInfo; /* 0x10 */ u32 mCameraMapInfo;
+39 -35
View File
@@ -24,53 +24,57 @@ bool Z2AudioArcLoader::readCommandMore(u32 command) {
} }
void Z2AudioArcLoader::readBFCA(const void* addr) { void Z2AudioArcLoader::readBFCA(const void* addr) {
JUT_ASSERT(76, addr); {
JUT_ASSERT(76, addr);
JKRHeap* heap = JAUSectionHeap::getInstance()->getHeap(); JKRHeap* heap = JAUSectionHeap::getInstance()->getHeap();
JUT_ASSERT(78, heap); JUT_ASSERT(78, heap);
JUT_ASSERT(79, Z2GetFxLineMgr()); JUT_ASSERT(79, Z2GetFxLineMgr());
JKRArchive* archive = JKRMountArchive((void*)addr, JKRGetCurrentHeap(), JKRArchive::MOUNT_DIRECTION_TAIL); JKRArchive* archive = JKRMountArchive((void*)addr, JKRGetCurrentHeap(), JKRArchive::MOUNT_DIRECTION_TAIL);
Z2GetFxLineMgr()->initDataArc(archive, heap); Z2GetFxLineMgr()->initDataArc(archive, heap);
JKRUnmountArchive(archive); JKRUnmountArchive(archive);
}
} }
void Z2AudioArcLoader::readBSTN(const void* addr, u32 param_1) { void Z2AudioArcLoader::readBSTN(const void* addr, u32 param_1) {
#if VERSION == VERSION_SHIELD_DEBUG #if VERSION == VERSION_SHIELD_DEBUG
JAUSectionHeap* sectionHeap = JASGlobalInstance<JAUSectionHeap>::getInstance(); {
JUT_ASSERT(97, sectionHeap); JAUSectionHeap* sectionHeap = JASGlobalInstance<JAUSectionHeap>::getInstance();
JUT_ASSERT(97, sectionHeap);
JUT_ASSERT(99, sectionHeap->isOpen()); JUT_ASSERT(99, sectionHeap->isOpen());
JUT_ASSERT(100, sectionHeap->isBuilding()); JUT_ASSERT(100, sectionHeap->isBuilding());
JUT_ASSERT(101, addr); JUT_ASSERT(101, addr);
JUT_ASSERT(103, sectionHeap->getSectionHeapData().soundNameTable == 0); JUT_ASSERT(103, sectionHeap->getSectionHeapData().soundNameTable == 0);
JKRHeap* heap = JKRHeap::getCurrentHeap(); JKRHeap* heap = JKRHeap::getCurrentHeap();
JKRHeap* gameHeap = (JKRHeap*)mDoExt_getGameHeap(); JKRHeap* gameHeap = (JKRHeap*)mDoExt_getGameHeap();
JKRSetCurrentHeap(gameHeap); JKRSetCurrentHeap(gameHeap);
u8* bstnDst = (u8*)addr; u8* bstnDst = (u8*)addr;
if (param_1 != 0) { if (param_1 != 0) {
bstnDst = new (gameHeap, 4) u8[param_1]; bstnDst = new (gameHeap, 4) u8[param_1];
if (bstnDst != NULL) { if (bstnDst != NULL) {
memcpy(bstnDst, addr, param_1); memcpy(bstnDst, addr, param_1);
}
JUT_ASSERT(122, bstnDst);
} }
JUT_ASSERT(122, bstnDst); JAUSoundNameTable* soundNameTable = new (gameHeap, 0) JAUSoundNameTable(true);
JUT_ASSERT(125, soundNameTable);
soundNameTable->init(bstnDst);
JAUSectionHeap::TSectionHeapData& sectionHeapData = (JAUSectionHeap::TSectionHeapData&)sectionHeap->getSectionHeapData();
sectionHeapData.soundNameTable = soundNameTable;
JAUSection::TSectionData& sectionData = (JAUSection::TSectionData&)sectionHeap->getSectionData();
sectionData.mBstnDst = bstnDst;
JKRSetCurrentHeap(heap);
} }
JAUSoundNameTable* soundNameTable = new (gameHeap, 0) JAUSoundNameTable(true);
JUT_ASSERT(125, soundNameTable);
soundNameTable->init(bstnDst);
JAUSectionHeap::TSectionHeapData& sectionHeapData = (JAUSectionHeap::TSectionHeapData&)sectionHeap->getSectionHeapData();
sectionHeapData.soundNameTable = soundNameTable;
JAUSection::TSectionData& sectionData = (JAUSection::TSectionData&)sectionHeap->getSectionData();
sectionData.mBstnDst = bstnDst;
JKRSetCurrentHeap(heap);
#endif #endif
} }
+1 -1
View File
@@ -46,7 +46,7 @@ f32 Z2Calc::getRandom(f32 magnitude, f32 exponent, f32 bias) {
f32 negBias = (1.0f - bias) * -2.0f; f32 negBias = (1.0f - bias) * -2.0f;
magnitude *= Z2Calc::getRandom_0_1() < bias ? posBias : negBias; magnitude *= Z2Calc::getRandom_0_1() < bias ? posBias : negBias;
f32 exprnd = pow(Z2Calc::getRandom_0_1(), exponent); f32 exprnd = powf(Z2Calc::getRandom_0_1(), exponent);
return exprnd * magnitude; return exprnd * magnitude;
} }
+12
View File
@@ -80,7 +80,13 @@ u8 Z2Param::BGM_CROSS_FADEIN_TIME = 60;
u8 Z2Param::BGM_CROSS_FADEOUT_TIME = 60; u8 Z2Param::BGM_CROSS_FADEOUT_TIME = 60;
u8 Z2Param::BATTLE_BGM_WAIT_TIME = 30; u8 Z2Param::BATTLE_BGM_WAIT_TIME = 30;
#if DEBUG
f32 Z2Param::ENEMY_NEARBY_DIST = 700.0f;
f32 Z2Param::BATTLE_FADEIN_DIST = 1100.0f;
f32 Z2Param::BATTLE_FADEOUT_DIST = 1500.0f;
#endif
u8 Z2Param::FOUND_TRACK_FI_TIME = 20; u8 Z2Param::FOUND_TRACK_FI_TIME = 20;
u8 Z2Param::FOUND_TRACK_FO_TIME = 30; u8 Z2Param::FOUND_TRACK_FO_TIME = 30;
@@ -98,7 +104,13 @@ u8 Z2Param::ENDING_BLOW_VOL_LOWER_RECOVER_TIME = 30;
u8 Z2Param::ENDING_BLOW_MIN_FINISH_TIME = 20; u8 Z2Param::ENDING_BLOW_MIN_FINISH_TIME = 20;
u8 data_8045086C = 1; u8 data_8045086C = 1;
#if DEBUG
f32 Z2Param::AUDIBLE_DELTA_RANGE_VOLUME = 0.25f;
f32 Z2Param::AUDIBLE_DELTA_RANGE_PAN = 0.15f;
f32 Z2Param::AUDIBLE_DELTA_RANGE_DOLBY = 0.15f;
#endif
f32 Z2Param::MIN_DISTANCE_VOLUME; f32 Z2Param::MIN_DISTANCE_VOLUME;
f32 Z2Param::ENEMY_LASTHIT_MUTE_VOLUME; f32 Z2Param::ENEMY_LASTHIT_MUTE_VOLUME;
+60 -70
View File
@@ -77,7 +77,7 @@ void Z2SeMgr::modHeightAtCamera(const Vec** param_0) {
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (mModY[i] == NULL) { if (mModY[i] == NULL) {
idx = i; idx = i;
mModY[i] = *param_0; mModY[idx] = *param_0;
break; break;
} }
} }
@@ -752,71 +752,77 @@ void Z2SeMgr::messageSePlay(u16 param_0, Vec* param_1, s8 param_2) {
} }
void Z2SeMgr::talkInSe() { void Z2SeMgr::talkInSe() {
if (Z2GetSceneMgr()->isInGame()) { if (!Z2GetSceneMgr()->isInGame()) {
if (Z2GetStatusMgr()->getDemoStatus() == 13) { return;
seMoveVolumeAll(0.0f, 0); }
}
JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr(); if (Z2GetStatusMgr()->getDemoStatus() == 13) {
seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_TALKING, 2); seMoveVolumeAll(0.0f, 0);
seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_TALKING, 2); }
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_TALKING, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_TALKING, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_TALKING, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_TALKING, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_TALKING, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_TALKING, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_TALKING, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) { JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr();
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_TALKING, 2); seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_TALKING, 2);
} seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_TALKING, 2);
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_TALKING, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_TALKING, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_TALKING, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_TALKING, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_TALKING, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_TALKING, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_TALKING, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) {
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_TALKING, 2);
} }
} }
void Z2SeMgr::talkOutSe() { void Z2SeMgr::talkOutSe() {
if (Z2GetSceneMgr()->isInGame()) { if (!Z2GetSceneMgr()->isInGame()) {
if (Z2GetStatusMgr()->getDemoStatus() == 13) { return;
seMoveVolumeAll(0.0f, 0); }
}
JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr(); if (Z2GetStatusMgr()->getDemoStatus() == 13) {
seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_DEFAULT, 2); seMoveVolumeAll(0.0f, 0);
seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_DEFAULT, 2); }
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_DEFAULT, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_DEFAULT, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_DEFAULT, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_DEFAULT, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_DEFAULT, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_DEFAULT, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_DEFAULT, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) { JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr();
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_DEFAULT, 2); seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_DEFAULT, 2);
} seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_DEFAULT, 2);
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_DEFAULT, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_DEFAULT, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_DEFAULT, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_DEFAULT, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_DEFAULT, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_DEFAULT, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_DEFAULT, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) {
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_DEFAULT, 2);
} }
} }
void Z2SeMgr::menuInSe() { void Z2SeMgr::menuInSe() {
if (Z2GetSceneMgr()->isInGame()) { if (!Z2GetSceneMgr()->isInGame()) {
if (Z2GetStatusMgr()->getDemoStatus() == 13) { return;
seMoveVolumeAll(0.0f, 0); }
}
JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr(); if (Z2GetStatusMgr()->getDemoStatus() == 13) {
seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_PAUSING, 2); seMoveVolumeAll(0.0f, 0);
seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_PAUSING, 2); }
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_PAUSING, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_PAUSING, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_PAUSING, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_PAUSING, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_PAUSING, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_PAUSING, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_PAUSING, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) { JAISeMgr* seMgr = Z2GetSoundMgr()->getSeMgr();
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_PAUSING, 2); seMgr->getCategory(0)->getParams()->moveVolume(Z2Param::VOL_SE_SYSTEM_PAUSING, 2);
} seMgr->getCategory(1)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_VOICE_PAUSING, 2);
seMgr->getCategory(2)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_MOTION_PAUSING, 2);
seMgr->getCategory(3)->getParams()->moveVolume(Z2Param::VOL_SE_LINK_FOOTNOTE_PAUSING, 2);
seMgr->getCategory(4)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_PAUSING, 2);
seMgr->getCategory(5)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_PAUSING, 2);
seMgr->getCategory(6)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_MOVE_PAUSING, 2);
seMgr->getCategory(7)->getParams()->moveVolume(Z2Param::VOL_SE_CHAR_VOICE_PAUSING, 2);
seMgr->getCategory(8)->getParams()->moveVolume(Z2Param::VOL_SE_OBJECT_PAUSING, 2);
if (Z2GetStatusMgr()->getDemoStatus() != 12) {
seMgr->getCategory(9)->getParams()->moveVolume(Z2Param::VOL_SE_ATMOSPHERE_PAUSING, 2);
} }
} }
@@ -1231,25 +1237,9 @@ void Z2MultiSeMgr::resetMultiSePos() {
} }
f32 Z2MultiSeMgr::getPanPower() { f32 Z2MultiSeMgr::getPanPower() {
f32 pow_r = getMaxPowR(); return getMaxPowL() + getMaxPowR() > 0.0f ? getMaxPowR() / (getMaxPowL() + getMaxPowR()) : 0.5f;
f32 pow_l = getMaxPowL();
if (pow_l + pow_r > 0.0f) {
f32 pow_r = getMaxPowR();
f32 pow_l = getMaxPowL();
return getMaxPowR() / (pow_l + pow_r);
} else {
return 0.5f;
}
} }
f32 Z2MultiSeMgr::getDolbyPower() { f32 Z2MultiSeMgr::getDolbyPower() {
f32 pow_b = getMaxPowB(); return getMaxPowF() + getMaxPowB() > 0.0f ? getMaxPowB() / (getMaxPowF() + getMaxPowB()) : 0.5f;
f32 pow_f = getMaxPowF();
if (pow_f + pow_b > 0.0f) {
f32 pow_b = getMaxPowB();
f32 pow_f = getMaxPowF();
return getMaxPowB() / (pow_f + pow_b);
} else {
return 0.5f;
}
} }
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -120,8 +120,7 @@ void Z2SoundHandles::stopAllSounds(u32 fadeTime) {
} }
bool Z2SoundHandles::isActive() const { bool Z2SoundHandles::isActive() const {
JSULink<Z2SoundHandlePool>* i; for (JSULink<Z2SoundHandlePool>*i = getFirst(); i != NULL; i = i->getNext()) {
for (i = getFirst(); i != NULL; i = i->getNext()) {
if (i->getObject()->isSoundAttached()) { if (i->getObject()->isSoundAttached()) {
return true; return true;
} }
+6 -2
View File
@@ -14,6 +14,10 @@
#include "Z2AudioLib/Z2AudioCS.h" #include "Z2AudioLib/Z2AudioCS.h"
#endif #endif
static void dummy() {
OS_REPORT("seqCallBack!!!!!\n");
}
u16 seqCallback(JASTrack* track, u16 command) { u16 seqCallback(JASTrack* track, u16 command) {
switch (command) { switch (command) {
case 0x1000: case 0x1000:
@@ -246,7 +250,7 @@ void Z2SoundMgr::resetFilterAll() {
i = 0; i = 0;
} }
for (; i < 9; i++) { for (; i < MAX_CATEGORIES; i++) {
JAISeCategoryMgr* category = seMgr_.getCategory(i); JAISeCategoryMgr* category = seMgr_.getCategory(i);
int se_count = category->getMaxActiveSe(); int se_count = category->getMaxActiveSe();
if (se_count > 0) { if (se_count > 0) {
@@ -274,7 +278,7 @@ void Z2SoundMgr::mixOut() {
i = 0; i = 0;
} }
for (; i < 9; i++) { for (; i < MAX_CATEGORIES; i++) {
JAISeCategoryMgr* category = seMgr_.getCategory(i); JAISeCategoryMgr* category = seMgr_.getCategory(i);
int se_count = category->getMaxActiveSe(); int se_count = category->getMaxActiveSe();
if (se_count > 0) { if (se_count > 0) {