2016-12-11 17:14:42 +00:00
|
|
|
|
using System;
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Atari.Lynx
|
|
|
|
|
{
|
|
|
|
|
public partial class Lynx : ISoundProvider
|
|
|
|
|
{
|
2017-04-24 16:51:59 +00:00
|
|
|
|
private readonly short[] _soundbuff = new short[2048];
|
|
|
|
|
private int _numsamp;
|
2016-12-11 17:14:42 +00:00
|
|
|
|
|
2017-04-24 16:51:59 +00:00
|
|
|
|
public bool CanProvideAsync => false;
|
2016-12-11 17:14:42 +00:00
|
|
|
|
|
|
|
|
|
public void GetSamplesSync(out short[] samples, out int nsamp)
|
|
|
|
|
{
|
2017-04-24 16:51:59 +00:00
|
|
|
|
samples = _soundbuff;
|
|
|
|
|
nsamp = _numsamp;
|
2016-12-11 17:14:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DiscardSamples()
|
|
|
|
|
{
|
|
|
|
|
// Nothing to do
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetSyncMode(SyncSoundMode mode)
|
|
|
|
|
{
|
|
|
|
|
if (mode == SyncSoundMode.Async)
|
|
|
|
|
{
|
|
|
|
|
throw new NotSupportedException("Async mode is not supported.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-24 16:51:59 +00:00
|
|
|
|
public SyncSoundMode SyncMode => SyncSoundMode.Sync;
|
2016-12-11 17:14:42 +00:00
|
|
|
|
|
|
|
|
|
public void GetSamplesAsync(short[] samples)
|
|
|
|
|
{
|
|
|
|
|
throw new InvalidOperationException("Async mode is not supported.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|