mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-10 06:16:52 -04:00
JAISound
This commit is contained in:
@@ -94,7 +94,18 @@ namespace JAInter {
|
||||
/* 0x0C60 */ MoveParaSet field_0xc60[32];
|
||||
/* 0x0E60 */ u8 field_0xe60[0x1261 - 0xe60];
|
||||
/* 0x1261 */ u8 field_0x1261;
|
||||
/* 0x1262 */ u8 field_0x1262[0x133c - 0x1262];
|
||||
/* 0x1262 */ u8 field_0x1262[0x1268 - 0x1262];
|
||||
/* 0x1268 */ int field_0x1268;
|
||||
/* 0x126C */ int field_0x126c;
|
||||
/* 0x1270 */ int field_0x1270;
|
||||
/* 0x1274 */ int field_0x1274;
|
||||
/* 0x1278 */ int field_0x1278;
|
||||
/* 0x127C */ int field_0x127c;
|
||||
/* 0x1280 */ int field_0x1280;
|
||||
/* 0x1284 */ u8 field_0x1284[0x1298 - 0x1284];
|
||||
/* 0x1298 */ int field_0x1298;
|
||||
/* 0x129C */ int field_0x129c[32];
|
||||
/* 0x131C */ u8 field_0x131c[32];
|
||||
/* 0x133C */ MuteBit field_0x133c[32];
|
||||
/* 0x135C */ SeqUpdateData* field_0x135c;
|
||||
/* 0x1360 */ JASystem::TTrack field_0x1360;
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
virtual void setSeDistanceDolby(u8);
|
||||
virtual void setSePositionDopplar();
|
||||
|
||||
int getSeCategoryNumber();
|
||||
u8 getSeCategoryNumber();
|
||||
int getSwBit();
|
||||
int checkSwBit(u32);
|
||||
u8 getInfoPriority();
|
||||
@@ -112,6 +112,14 @@ public:
|
||||
void setVolumeU7(u8, u32, u8) {}
|
||||
void setWait(u8) {}
|
||||
|
||||
struct PositionInfo_t {
|
||||
f32 field_0x0;
|
||||
u8 field_0x4[0x8 - 0x4];
|
||||
f32 field_0x8;
|
||||
u8 field_0xc[0x18 - 0xc];
|
||||
f32 field_0x18;
|
||||
};
|
||||
|
||||
/* 0x04 */ u8 field_0x4;
|
||||
/* 0x05 */ u8 field_0x5;
|
||||
/* 0x06 */ u8 field_0x6;
|
||||
@@ -124,7 +132,7 @@ public:
|
||||
/* 0x14 */ u32 field_0x14;
|
||||
/* 0x18 */ int field_0x18;
|
||||
/* 0x1c */ int field_0x1c;
|
||||
/* 0x20 */ void* field_0x20;
|
||||
/* 0x20 */ PositionInfo_t* mPositionInfo;
|
||||
/* 0x24 */ void* field_0x24;
|
||||
/* 0x28 */ int field_0x28;
|
||||
/* 0x2C */ int field_0x2c;
|
||||
@@ -170,7 +178,7 @@ namespace JAInter {
|
||||
|
||||
/* 0x00 */ JAISound* field_0x0;
|
||||
/* 0x04 */ JAISound* field_0x4;
|
||||
/* 0x08 */ JAISound* field_0x8;
|
||||
/* 0x08 */ JAISound* Buffer;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@ namespace JASystem {
|
||||
|
||||
namespace JAInter {
|
||||
class Actor;
|
||||
class StreamParameter {
|
||||
public:
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
};
|
||||
|
||||
namespace StreamMgr {
|
||||
void init();
|
||||
void storeStreamBuffer(JAISound**, Actor*, u32, u32, u8, void*);
|
||||
|
||||
@@ -25,7 +25,7 @@ void JAInter::SequenceMgr::init() {
|
||||
for (int i = 0; i < JAIGlobalParameter::getParamSeqControlBufferMax(); i++) {
|
||||
SeqParameter* _para = new (JAIBasic::getCurrentJAIHeap(), 0x20) SeqParameter();
|
||||
JUT_ASSERT_MSG(47, _para, "JAISequenceMgr::initHeap Cannot Alloc Heap!!\n");
|
||||
seqControl.field_0x8[i].field_0x3c = _para;
|
||||
seqControl.Buffer[i].field_0x3c = _para;
|
||||
_para->seqPan = new (JAIBasic::getCurrentJAIHeap(), 0x20) MoveParaSet[JAIGlobalParameter::getParamSeqParameterLines()];
|
||||
JUT_ASSERT_MSG(50, _para->seqPan, "JAISequenceMgr::initHeap Cannot Alloc Heap!!\n");
|
||||
_para->seqPitch = new (JAIBasic::getCurrentJAIHeap(), 0x20) MoveParaSet[JAIGlobalParameter::getParamSeqParameterLines()];
|
||||
|
||||
+418
-47
@@ -5,6 +5,12 @@
|
||||
|
||||
#include "JSystem/JAudio/JAISound.h"
|
||||
#include "JSystem/JAudio/JAIBasic.h"
|
||||
#include "JSystem/JAudio/JAIGlobalParameter.h"
|
||||
#include "JSystem/JAudio/JAISeMgr.h"
|
||||
#include "JSystem/JAudio/JAISequenceMgr.h"
|
||||
#include "JSystem/JAudio/JAIStreamMgr.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
/* 8029859C-802985C4 .text __ct__8JAISoundFv */
|
||||
JAISound::JAISound() {
|
||||
@@ -15,13 +21,13 @@ JAISound::JAISound() {
|
||||
}
|
||||
|
||||
/* 802985C4-802985E8 .text getSeCategoryNumber__8JAISoundFv */
|
||||
int JAISound::getSeCategoryNumber() {
|
||||
/* Nonmatching */
|
||||
u8 JAISound::getSeCategoryNumber() {
|
||||
return JAInter::SeMgr::changeIDToCategory(this->field_0xc);
|
||||
}
|
||||
|
||||
/* 802985E8-802985F4 .text getSwBit__8JAISoundFv */
|
||||
int JAISound::getSwBit() {
|
||||
/* Nonmatching */
|
||||
return ((u32*)field_0x40)[0];
|
||||
}
|
||||
|
||||
/* 802985F4-80298624 .text checkSwBit__8JAISoundFUl */
|
||||
@@ -31,7 +37,7 @@ int JAISound::checkSwBit(u32 param_1) {
|
||||
|
||||
/* 80298624-80298630 .text getInfoPriority__8JAISoundFv */
|
||||
u8 JAISound::getInfoPriority() {
|
||||
/* Nonmatching */
|
||||
return ((u8*)field_0x40)[4];
|
||||
}
|
||||
|
||||
/* 80298630-80298648 .text clearMainSoundPPointer__8JAISoundFv */
|
||||
@@ -54,48 +60,191 @@ void JAISound::stop(u32 param_1) {
|
||||
}
|
||||
|
||||
/* 802986B8-8029878C .text setVolume__8JAISoundFfUlUc */
|
||||
void JAISound::setVolume(f32, u32, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setVolume(f32 param_1, u32 param_2, u8 param_3) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqInterVolume(param_3, param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
setSeInterVolume(param_3, param_1, param_2, 0);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
setStreamInterVolume(param_3, param_1, param_2);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(177, 0, "JAISound::setVolume サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy1() {
|
||||
OSReport("JAISound::setDirectVolume サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 8029878C-80298864 .text setPan__8JAISoundFfUlUc */
|
||||
void JAISound::setPan(f32, u32, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setPan(f32 param_1, u32 param_2, u8 param_3) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqInterPan(param_3, param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
setSeInterPan(param_3, param_1, param_2, 0);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
setStreamInterPan(param_3, param_1, param_2);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(217, 0, "JAISound::setPan サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy2() {
|
||||
OSReport("JAISound::setDirectPan サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 80298864-8029893C .text setPitch__8JAISoundFfUlUc */
|
||||
void JAISound::setPitch(f32, u32, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setPitch(f32 param_1, u32 param_2, u8 param_3) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqInterPitch(param_3, param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
setSeInterPitch(param_3, param_1, param_2, 0);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
setStreamInterPitch(param_3, param_1, param_2);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(257, 0, "JAISound::setPitch サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy3() {
|
||||
OSReport("JAISound::setDirectPitch サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 8029893C-80298A04 .text setFxmix__8JAISoundFfUlUc */
|
||||
void JAISound::setFxmix(f32, u32, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setFxmix(f32 param_1, u32 param_2, u8 param_3) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqInterFxmix(param_3, param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
setSeInterFxmix(param_3, param_1, param_2, 0);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(297, 0, "JAISound::setFxmix サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy4() {
|
||||
OSReport("JAISound::setDirectFxmix サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 80298A04-80298ACC .text setDolby__8JAISoundFfUlUc */
|
||||
void JAISound::setDolby(f32, u32, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setDolby(f32 param_1, u32 param_2, u8 param_3) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqInterDolby(param_3, param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
setSeInterDolby(param_3, param_1, param_2, 0);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(337, 0, "JAISound::setDolby サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy5() {
|
||||
OSReport("JAISound::setDirectDolby サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 80298ACC-80298B74 .text setTempoProportion__8JAISoundFfUl */
|
||||
void JAISound::setTempoProportion(f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setTempoProportion(f32 param_1, u32 param_2) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqTempoProportion(param_1, param_2);
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
case 0xC0000000:
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(377, 0, "JAISound::setTempoProportion サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* 80298B74-80298C28 .text setPortData__8JAISoundFUcUs */
|
||||
void JAISound::setPortData(u8, u16) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setPortData(u8 param_1, u16 param_2) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqPortData(param_1, param_2, 0);
|
||||
break;
|
||||
case 0:
|
||||
setSePortData(param_1, param_2);
|
||||
break;
|
||||
case 0xC0000000:
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(397, 0, "JAISound::setPortData サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* 80298C28-80298CD8 .text setPrepareFlag__8JAISoundFUc */
|
||||
void JAISound::setPrepareFlag(u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setPrepareFlag(u8 param_1) {
|
||||
switch(field_0xc & 0xc0000000) {
|
||||
case 0x80000000:
|
||||
setSeqPrepareFlag(param_1);
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
case 0xC0000000:
|
||||
setStreamPrepareFlag(param_1);
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(416, 0, "JAISound::setPrepareFlag サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* 80298CD8-80298E30 .text setDistanceVolumeCommon__8JAISoundFfUc */
|
||||
f32 JAISound::setDistanceVolumeCommon(f32, u8) {
|
||||
/* Nonmatching */
|
||||
f32 JAISound::setDistanceVolumeCommon(f32 param_1, u8 param_2) {
|
||||
f32 var1;
|
||||
if (field_0x8 != 4) {
|
||||
var1 = mPositionInfo[field_0x8].field_0x18;
|
||||
} else {
|
||||
var1 = mPositionInfo[0].field_0x18;
|
||||
for (u8 i = 1; i < JAIGlobalParameter::audioCameraMax; i++) {
|
||||
if (mPositionInfo[i].field_0x18 < var1) {
|
||||
var1 = mPositionInfo[i].field_0x18;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (var1 < JAIGlobalParameter::maxVolumeDistance) {
|
||||
return 1.0f;
|
||||
}
|
||||
var1 -= JAIGlobalParameter::maxVolumeDistance;
|
||||
f32 var2 = param_1 - JAIGlobalParameter::maxVolumeDistance;
|
||||
if (param_2 > 3) {
|
||||
var2 /= 1 << (param_2 & 3) + 1;
|
||||
} else if (param_2 != 0) {
|
||||
var2 *= 1 << (param_2 & 3);
|
||||
}
|
||||
if (var1 < var2) {
|
||||
if (param_2 > 3) {
|
||||
return 1.0f - var1 / var2;
|
||||
} else {
|
||||
return JAIGlobalParameter::minDistanceVolume + (1.0f - JAIGlobalParameter::minDistanceVolume) * (1.0f - var1 / var2);
|
||||
}
|
||||
} else {
|
||||
if (param_2 > 3) {
|
||||
return 0.0f;
|
||||
} else {
|
||||
return JAIGlobalParameter::minDistanceVolume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 80298E30-80298F8C .text setDistancePanCommon__8JAISoundFv */
|
||||
@@ -109,48 +258,178 @@ f32 JAISound::setPositionDopplarCommon(u32) {
|
||||
}
|
||||
|
||||
/* 80299178-8029925C .text setSeqInterVolume__8JAISoundFUcfUl */
|
||||
void JAISound::setSeqInterVolume(u8, f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setSeqInterVolume(u8 line_, f32 param_2, u32 param_3) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
int r31 = getSeqParameter()->field_0x110[line_].set(param_2, param_3);
|
||||
if (r31 == 1) {
|
||||
getSeqParameter()->field_0x126c |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r31 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x40000;
|
||||
}
|
||||
}
|
||||
|
||||
static void dummy6() {
|
||||
OSReport("JAISound::checkReady サウンドカテゴリービットが異常です。\n");
|
||||
}
|
||||
|
||||
/* 8029925C-802993AC .text setSeqInterPan__8JAISoundFUcfUl */
|
||||
void JAISound::setSeqInterPan(u8, f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setSeqInterPan(u8 line_, f32 param_2, u32 param_3) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
JUT_ASSERT_MSG(660, line_<JAIGlobalParameter::seqParameterLines, "JAISound::setSeqInterPan 設定できるライン数を超えています。\n");
|
||||
int r31 = getSeqParameter()->seqPan[line_].set(param_2, param_3);
|
||||
if (r31 == 1) {
|
||||
getSeqParameter()->field_0x1270 |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r31 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x80000;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802993AC-802994FC .text setSeqInterPitch__8JAISoundFUcfUl */
|
||||
void JAISound::setSeqInterPitch(u8, f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setSeqInterPitch(u8 line_, f32 param_2, u32 param_3) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
JUT_ASSERT_MSG(678, line_<JAIGlobalParameter::seqParameterLines, "JAISound::setSeqInterPan 設定できるライン数を超えています。\n");
|
||||
int r31 = getSeqParameter()->seqPitch[line_].set(param_2, param_3);
|
||||
if (r31 == 1) {
|
||||
getSeqParameter()->field_0x1274 |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r31 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x100000;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802994FC-8029964C .text setSeqInterFxmix__8JAISoundFUcfUl */
|
||||
void JAISound::setSeqInterFxmix(u8, f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setSeqInterFxmix(u8 line_, f32 param_2, u32 param_3) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
JUT_ASSERT_MSG(696, line_<JAIGlobalParameter::seqParameterLines, "JAISound::setSeqInterPan 設定できるライン数を超えています。\n");
|
||||
int r31 = getSeqParameter()->seqFxmix[line_].set(param_2, param_3);
|
||||
if (r31 == 1) {
|
||||
getSeqParameter()->field_0x1278 |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r31 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x200000;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029964C-802997E4 .text setSeqInterDolby__8JAISoundFUcfUl */
|
||||
void JAISound::setSeqInterDolby(u8, f32, u32) {
|
||||
void JAISound::setSeqInterDolby(u8 line_, f32 param_2, u32 param_3) {
|
||||
/* Nonmatching */
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
JUT_ASSERT_MSG(714, line_<JAIGlobalParameter::seqParameterLines, "JAISound::setSeqInterPan 設定できるライン数を超えています。\n");
|
||||
if (JAIBasic::getInterface()->field_0xd != 2) {
|
||||
if (getSeqParameter()->seqDolby[line_].field_0x4 == 0.0f) {
|
||||
return;
|
||||
}
|
||||
param_2 = 0.0f;
|
||||
}
|
||||
int r31 = getSeqParameter()->seqDolby[line_].set(param_2, param_3);
|
||||
if (r31 == 1) {
|
||||
getSeqParameter()->field_0x127c |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r31 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x400000;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802997E4-80299884 .text setSeqTempoProportion__8JAISoundFfUl */
|
||||
void JAISound::setSeqTempoProportion(f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setSeqTempoProportion(f32 param_1, u32 param_2) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
getSeqParameter()->field_0x0.set(param_1, param_2);
|
||||
if (getSeqParameter()->field_0x135c) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 4;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80299884-802999F4 .text setSeqPortData__8JAISoundFUcUsUl */
|
||||
void JAISound::setSeqPortData(u8, u16, u32) {
|
||||
void JAISound::setSeqPortData(u8 line_, u16 param_2, u32 param_3) {
|
||||
/* Nonmatching */
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
if (getSeqParameter()->field_0x10[line_].field_0x4 == 0.0f && field_0x5 >= 3) {
|
||||
u16 local_38;
|
||||
JASystem::TTrack* track = &getSeqParameter()->field_0x1360;
|
||||
track->readPortApp(line_ << 16, &local_38);
|
||||
getSeqParameter()->field_0x10[line_].field_0x4 = local_38;
|
||||
}
|
||||
int r29 = getSeqParameter()->field_0x10[line_].set(param_2, param_3);
|
||||
if (r29 == 1) {
|
||||
getSeqParameter()->field_0x1268 |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r29 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802999F4-80299B14 .text setTrackVolume__8JAISoundFUcfUl */
|
||||
void JAISound::setTrackVolume(u8, f32, u32) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setTrackVolume(u8 line_, f32 param_2, u32 param_3) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
if (field_0x5 >= 4 && (getSeqParameter()->field_0x135c->field_0x4 & 1 << line_) == 0) {
|
||||
return;
|
||||
}
|
||||
if (param_3 == 0) {
|
||||
param_3++;
|
||||
}
|
||||
int r30 = getSeqParameter()->field_0x260[line_].set(param_2, param_3);
|
||||
if (r30 == 1) {
|
||||
getSeqParameter()->field_0x1280 |= 1 << line_;
|
||||
}
|
||||
if (getSeqParameter()->field_0x135c && r30 != 2) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x40;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80299B14-80299BAC .text setTrackInterruptSwitch__8JAISoundFUcUc */
|
||||
void JAISound::setTrackInterruptSwitch(u8, u8) {
|
||||
/* Nonmatching */
|
||||
void JAISound::setTrackInterruptSwitch(u8 param_1, u8 param_2) {
|
||||
if ((field_0xc & 0xC0000000) != 0x80000000) {
|
||||
return;
|
||||
}
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
getSeqParameter()->field_0x131c[param_1] = param_2;
|
||||
if (getSeqParameter()->field_0x135c) {
|
||||
getSeqParameter()->field_0x135c->field_0x8 |= 0x800000;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80299BAC-80299CD4 .text setTrackPortData__8JAISoundFUcUcUs */
|
||||
@@ -224,9 +503,7 @@ void JAISound::setSeDistanceFxmix(u8) {
|
||||
}
|
||||
|
||||
/* 8029A6B0-8029A6B4 .text setSeDistanceFir__8JAISoundFUc */
|
||||
void JAISound::setSeDistanceFir(u8) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
void JAISound::setSeDistanceFir(u8) {}
|
||||
|
||||
/* 8029A6B4-8029A788 .text setSeDistanceDolby__8JAISoundFUc */
|
||||
void JAISound::setSeDistanceDolby(u8) {
|
||||
@@ -254,8 +531,69 @@ void JAISound::setStreamPrepareFlag(u8) {
|
||||
}
|
||||
|
||||
/* 8029AA84-8029ACF0 .text setPauseMode__8JAISoundFUcUc */
|
||||
void JAISound::setPauseMode(u8, u8) {
|
||||
void JAISound::setPauseMode(u8 param_1, u8 param_2) {
|
||||
/* Nonmatching */
|
||||
switch (field_0xc & 0xC0000000) {
|
||||
case 0x80000000:
|
||||
if (!getSeqParameter()) {
|
||||
return;
|
||||
}
|
||||
if (param_1 == 3) {
|
||||
param_1 = 4;
|
||||
}
|
||||
if (param_1 != 0) {
|
||||
switch (param_1) {
|
||||
case 1:
|
||||
setSeqInterVolume(11, param_2 / 127.0f, 1);
|
||||
break;
|
||||
case 2:
|
||||
JASystem::TTrack* track = &getSeqParameter()->field_0x1360;
|
||||
track->pause(true, true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
getSeqParameter();
|
||||
switch (getSeqParameter()->field_0x1261) {
|
||||
case 1:
|
||||
setSeqInterVolume(11, 1.0f, 1);
|
||||
break;
|
||||
case 2:
|
||||
JASystem::TTrack* track = &getSeqParameter()->field_0x1360;
|
||||
track->pause(false, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
getSeqParameter()->field_0x1261 = param_1;
|
||||
break;
|
||||
case 0xC0000000:
|
||||
if (!getStreamParameter()) {
|
||||
return;
|
||||
}
|
||||
if (param_1 != 0) {
|
||||
switch (param_1) {
|
||||
case 1:
|
||||
setStreamInterVolume(11, param_2 / 127.0f, 1);
|
||||
break;
|
||||
case 2:
|
||||
JAInter::StreamLib::setPauseFlag(2);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (getStreamParameter()->field_0x0) {
|
||||
case 1:
|
||||
setStreamInterVolume(11, 1.0f, 1);
|
||||
break;
|
||||
case 2:
|
||||
JAInter::StreamLib::clearPauseFlag(2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
getStreamParameter()->field_0x0 = param_1;
|
||||
break;
|
||||
default:
|
||||
JUT_ASSERT_MSG(1443, 0, "JAISound::setPauseMode サウンドカテゴリービットが異常です。\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8029ACF0-8029AD54 .text setSeqPrepareFlag__8JAISoundFUc */
|
||||
@@ -275,17 +613,17 @@ f32 JAISound::getStreamInterVolume(u8) {
|
||||
|
||||
/* 8029AE34-8029AE3C .text getSeqParameter__8JAISoundFv */
|
||||
JAInter::SeqParameter* JAISound::getSeqParameter() {
|
||||
/* Nonmatching */
|
||||
return (JAInter::SeqParameter*)field_0x3c;
|
||||
}
|
||||
|
||||
/* 8029AE3C-8029AE44 .text getSeParameter__8JAISoundFv */
|
||||
JAInter::SeParameter* JAISound::getSeParameter() {
|
||||
/* Nonmatching */
|
||||
return (JAInter::SeParameter*)field_0x3c;
|
||||
}
|
||||
|
||||
/* 8029AE44-8029AE4C .text getStreamParameter__8JAISoundFv */
|
||||
JAInter::StreamParameter* JAISound::getStreamParameter() {
|
||||
/* Nonmatching */
|
||||
return (JAInter::StreamParameter*)field_0x3c;
|
||||
}
|
||||
|
||||
/* 8029AE4C-8029AE88 .text getTrackPortRoute__8JAISoundFUcUc */
|
||||
@@ -313,9 +651,42 @@ bool JAInter::MoveParaSet::move() {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
static void dummy7() {
|
||||
OSReport("JAISound::getVolume サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getPitch サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getFxmix サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getDolby サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getTempoProportion サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getPortData サウンドカテゴリービットが異常です。\n");
|
||||
OSReport("JAISound::getTrackParameterU7 未定義のサウンドパラメータです。\n");
|
||||
OSReport("JAISound::getTrackParameterF32 未定義のサウンドパラメータです。\n");
|
||||
OSReport("JAISound::getSeParametermeterF32 未定義のサウンドパラメータです。\n");
|
||||
}
|
||||
|
||||
/* 8029B0C4-8029B4AC .text init__Q27JAInter9LinkSoundFP8JAISoundUl */
|
||||
void JAInter::LinkSound::init(JAISound*, u32) {
|
||||
/* Nonmatching */
|
||||
void JAInter::LinkSound::init(JAISound* param_1, u32 param_2) {
|
||||
JAIGlobalParameter::getParamAudioCameraMax();
|
||||
Buffer = param_1;
|
||||
field_0x0 = Buffer;
|
||||
field_0x4 = NULL;
|
||||
Buffer[0x00].field_0x30 = NULL;
|
||||
Buffer[0x00].field_0x34 = Buffer + 1;
|
||||
Buffer[0x00].field_0x5 = 0;
|
||||
Buffer[0x00].mPositionInfo = new (JAIBasic::getCurrentJAIHeap(), 0x20) JAISound::PositionInfo_t[JAIGlobalParameter::getParamAudioCameraMax()];
|
||||
JUT_ASSERT_MSG(2084, Buffer[0x00].mPositionInfo, "LinkSound::initLinkSound Cannot Alloc Heap!!\n");
|
||||
int i;
|
||||
for (i = 1; i < param_2 - 1; i++) {
|
||||
Buffer[i].field_0x30 = Buffer + (i - 1);
|
||||
Buffer[i].field_0x34 = Buffer + (i + 1);
|
||||
Buffer[i].field_0x5 = 0;
|
||||
Buffer[i].mPositionInfo = new (JAIBasic::getCurrentJAIHeap(), 0x20) JAISound::PositionInfo_t[JAIGlobalParameter::getParamAudioCameraMax()];
|
||||
JUT_ASSERT_MSG(2092, Buffer[i].mPositionInfo, "LinkSound::initLinkSound Cannot Alloc Heap!!\n");
|
||||
}
|
||||
Buffer[i].field_0x30 = Buffer + (i - 1);
|
||||
Buffer[i].field_0x34 = NULL;
|
||||
Buffer[i].field_0x5 = 0;
|
||||
Buffer[i].mPositionInfo = new (JAIBasic::getCurrentJAIHeap(), 0x20) JAISound::PositionInfo_t[JAIGlobalParameter::getParamAudioCameraMax()];
|
||||
JUT_ASSERT_MSG(2099, Buffer[i].mPositionInfo, "LinkSound::initLinkSound Cannot Alloc Heap!!\n");
|
||||
}
|
||||
|
||||
/* 8029B4AC-8029B500 .text getSound__Q27JAInter9LinkSoundFv */
|
||||
|
||||
Reference in New Issue
Block a user