着重优化调度

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-07-21 09:58:21 +08:00
parent 04ec368a59
commit 02617c1385
117 changed files with 107322 additions and 1326 deletions

View File

@@ -27,6 +27,7 @@ namespace Ichni
public RTPC LowPassFilter;
private uint _playingId;
private AkSegmentInfo _segmentInfo;
public float songTimeSegment = 0;
public float pauseTimeSegment;
private float duration;
@@ -42,6 +43,12 @@ namespace Ichni
isStarting = false;
}
private void OnDestroy()
{
_segmentInfo?.Dispose();
_segmentInfo = null;
}
private void Update()
{
@@ -195,10 +202,10 @@ namespace Ichni
int PlaySegment()
{
AkSegmentInfo segmentInfo = new AkSegmentInfo();
AkUnitySoundEngine.GetPlayingSegmentInfo(_playingId, segmentInfo,true);
_segmentInfo ??= new AkSegmentInfo();
AkUnitySoundEngine.GetPlayingSegmentInfo(_playingId, _segmentInfo,true);
return segmentInfo.iCurrentPosition;
return _segmentInfo.iCurrentPosition;
}
}
}