A7800Hawk: Fix sound
This commit is contained in:
parent
0d6d8285a5
commit
39254cb0d2
|
@ -14,6 +14,8 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
|
||||
private bool _doTicks;
|
||||
|
||||
private int _spf;
|
||||
|
||||
public int _hsyncCnt;
|
||||
private int _capChargeStart;
|
||||
private bool _capCharging;
|
||||
|
@ -31,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
_capChargeStart = 0;
|
||||
_capCharging = false;
|
||||
AudioClocks = 0;
|
||||
|
||||
_spf = (Core.maria._frameHz > 55) ? 740 : 880;
|
||||
_doTicks = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
|
||||
public void GetSamplesSync(out short[] samples, out int nsamp)
|
||||
{
|
||||
short[] ret = new short[AudioClocks * 2];
|
||||
nsamp = AudioClocks;
|
||||
short[] ret = new short[_spf * 2];
|
||||
nsamp = _spf;
|
||||
GetSamples(ret);
|
||||
samples = ret;
|
||||
}
|
||||
|
@ -35,8 +35,6 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
AudioClocks = 0;
|
||||
}
|
||||
|
||||
private readonly int _spf;
|
||||
|
||||
// Exposing this as GetSamplesAsync would allow this to provide async sound
|
||||
// However, it does nothing special for async sound so I don't see a point
|
||||
private void GetSamples(short[] samples)
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
ser.Sync("Bus_State", ref BusState);
|
||||
|
||||
ser.Sync("Ticks", ref _doTicks);
|
||||
ser.Sync("_spf", ref _spf);
|
||||
|
||||
// some of these things weren't in the state because they weren't needed if
|
||||
// states were always taken at frame boundaries
|
||||
|
|
Loading…
Reference in New Issue