当游戏暂停时,中断音频处理
This commit is contained in:
parent
12a8b94050
commit
14f5621827
@ -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));
|
||||||
|
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -10,5 +10,5 @@
|
|||||||
"autoReferenced": false,
|
"autoReferenced": false,
|
||||||
"defineConstraints": [],
|
"defineConstraints": [],
|
||||||
"versionDefines": [],
|
"versionDefines": [],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": true
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user