From 14f56218278a8f9ce26804fbef85732eb5b60483 Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Wed, 4 Dec 2024 16:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E6=B8=B8=E6=88=8F=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E6=97=B6,=E4=B8=AD=E6=96=AD=E9=9F=B3=E9=A2=91=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/NesEmulator/AudioProvider.cs | 1 + .../Assets/Script/NesEmulator/NesEmulator.cs | 4 +++- .../Assets/VirtualNes.Core/VirtualNes.Core.asmdef | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) 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