当游戏暂停时,中断音频处理

This commit is contained in:
ALIENJACK\alien 2024-12-04 16:05:21 +08:00
parent 12a8b94050
commit 14f5621827
3 changed files with 5 additions and 2 deletions

View File

@ -27,6 +27,7 @@ namespace AxibugEmuOnline.Client
int step = channels; int step = channels;
if (NesEmu == null || NesEmu.NesCore == null) return; if (NesEmu == null || NesEmu.NesCore == null) return;
if (NesEmu.IsPause) return;
ProcessSound(NesEmu.NesCore, (uint)(data.Length / channels)); ProcessSound(NesEmu.NesCore, (uint)(data.Length / channels));

View File

@ -21,7 +21,9 @@ namespace AxibugEmuOnline.Client
//音频驱动这里是Unity接收模拟器音频数据的并播放出来的实现 //音频驱动这里是Unity接收模拟器音频数据的并播放出来的实现
public AudioProvider AudioProvider; public AudioProvider AudioProvider;
//是否暂停 //是否暂停
public bool m_bPause; private bool m_bPause;
/// <summary> 是否暂停 </summary>
public bool IsPause => m_bPause;
private void Start() private void Start()
{ {

View File

@ -10,5 +10,5 @@
"autoReferenced": false, "autoReferenced": false,
"defineConstraints": [], "defineConstraints": [],
"versionDefines": [], "versionDefines": [],
"noEngineReferences": false "noEngineReferences": true
} }