diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/AudioProvider.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/AudioProvider.cs index 614eb64..2acfc0e 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/AudioProvider.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/AudioProvider.cs @@ -27,6 +27,7 @@ namespace AxibugEmuOnline.Client int step = channels; if (NesEmu == null || NesEmu.NesCore == null) return; + if (NesEmu.IsPause) return; ProcessSound(NesEmu.NesCore, (uint)(data.Length / channels)); diff --git a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs index dae7063..f32f151 100644 --- a/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs +++ b/AxibugEmuOnline.Client/Assets/Script/NesEmulator/NesEmulator.cs @@ -21,7 +21,9 @@ namespace AxibugEmuOnline.Client //音频驱动(这里是Unity接收模拟器音频数据的并播放出来的实现) public AudioProvider AudioProvider; //是否暂停 - public bool m_bPause; + private bool m_bPause; + /// 是否暂停 + public bool IsPause => m_bPause; private void Start() { diff --git a/AxibugEmuOnline.Client/Assets/VirtualNes.Core/VirtualNes.Core.asmdef b/AxibugEmuOnline.Client/Assets/VirtualNes.Core/VirtualNes.Core.asmdef index b4819ec..99b3952 100644 --- a/AxibugEmuOnline.Client/Assets/VirtualNes.Core/VirtualNes.Core.asmdef +++ b/AxibugEmuOnline.Client/Assets/VirtualNes.Core/VirtualNes.Core.asmdef @@ -10,5 +10,5 @@ "autoReferenced": false, "defineConstraints": [], "versionDefines": [], - "noEngineReferences": false + "noEngineReferences": true } \ No newline at end of file