This commit is contained in:
左右看
2023-07-05 02:25:27 +08:00
parent 1a49208ad2
commit 2599726a62
5 changed files with 145 additions and 4 deletions
+46 -3
View File
@@ -740,11 +740,43 @@ public class UmaViewerBuilder : MonoBehaviour
UI.ResetAudioPlayer();
}
Debug.Log(SongAwb.Name);
//获取总线数
Debug.Log(CriAtomExAcf.GetNumDspSettings());
string busName = CriAtomExAcf.GetDspSettingNameByIndex(0);
var dspSetInfo = new CriAtomExAcf.AcfDspSettingInfo();
Debug.Log(CriAtomExAcf.GetDspSettingInformation(busName, out dspSetInfo));
Debug.Log(dspSetInfo.name);
Debug.Log(dspSetInfo.numExtendBuses);
Debug.Log(dspSetInfo.numBuses);
Debug.Log(dspSetInfo.numSnapshots);
Debug.Log(dspSetInfo.snapshotStartIndex);
var busInfo = new CriAtomExAcf.AcfDspBusInfo();
for(ushort i = 0; i < dspSetInfo.numExtendBuses; i++)
{
Debug.Log(i);
Debug.Log(CriAtomExAcf.GetDspBusInformation(i, out busInfo));
Debug.Log(busInfo.name);
Debug.Log(busInfo.volume);
Debug.Log(busInfo.numFxes);
Debug.Log(busInfo.numBusLinks);
}
//获取Acb文件和Awb文件的路径
string nameVar = SongAwb.Name.Split('.')[0].Split('/').Last();
//使用Live的Bgm
nameVar = $"snd_bgm_live_{songid}_oke";
//nameVar = $"snd_bgm_live_{songid}_oke";
LoadSound Loader = (LoadSound)ScriptableObject.CreateInstance("LoadSound");
LoadSound.UmaSoundInfo soundInfo = Loader.getSoundPath(nameVar);
@@ -759,6 +791,8 @@ public class UmaViewerBuilder : MonoBehaviour
foreach (CriAtomEx.CueInfo cueInfo in cueInfoList)
{
cueNameList.Add(cueInfo.name);
Debug.Log(cueInfo.type);
Debug.Log(cueInfo.userData);
}
//创建播放器
@@ -768,6 +802,17 @@ public class UmaViewerBuilder : MonoBehaviour
//播放
source.Play(cueNameList[0]);
//source.SetBusSendLevelOffset(1, 1);
/*
for (int i = 0; i < 17; i++)
{
Debug.Log(source.player.GetParameterFloat32((CriAtomEx.Parameter)i));
}
*/
}
//Use decrypt function
@@ -825,8 +870,6 @@ public class UmaViewerBuilder : MonoBehaviour
AudioSource source;
if (CurrentAudioSources.Count > 0)
{
if (Mathf.Abs(CurrentAudioSources[0].clip.length - clip.length) > 3) return;
source = CurrentAudioSources[0].gameObject.AddComponent<AudioSource>();
}
else