using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
///
/// Represents a PSG device (in this case an AY-3-891x)
///
public interface IPSG : ISoundProvider, IPortIODevice
{
///
/// Initlization routine
///
void Init(int sampleRate, int tStatesPerFrame);
///
/// Activates a register
///
int SelectedRegister { get; set; }
int[] ExportRegisters();
///
/// Writes to the PSG
///
void PortWrite(int value);
///
/// Reads from the PSG
///
int PortRead();
///
/// Resets the PSG
///
void Reset();
///
/// The volume of the AY chip
///
int Volume { get; set; }
///
/// Called at the start of a frame
///
void StartFrame();
///
/// called at the end of a frame
///
void EndFrame();
///
/// Updates the sound based on number of frame cycles
///
void UpdateSound(int frameCycle);
///
/// IStatable serialization
///
void SyncState(Serializer ser);
}
}