using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
///
/// Represents a PSG device (in this case an AY-3-891x)
///
public interface IPSG : ISoundProvider
{
///
/// Initlization routine
///
void Init(int sampleRate, int tStatesPerFrame);
void SetFunction(int data);
//void ClockCycle();
///
/// Activates a register
///
int SelectedRegister { get; set; }
///
/// 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);
}
}