namespace BizHawk.Emulation.Common
{
public enum SyncSoundMode { Sync, Async };
public interface ISoundProvider : IEmulatorService
{
///
/// Returns true if a core can provide Async sound
///
bool CanProvideAsync { get; }
///
/// Sets sync or async sound mode,
/// Sync should be the default mode if not set
/// All implementations must provide sync
/// If a core can not provide async sound and the mode is set to sync,
/// an NotSupportedException should be thrown
///
void SetSyncMode(SyncSoundMode mode);
///
/// Reports which mode the sound provider is currently in
///
SyncSoundMode SyncMode { get; }
///
/// Provides samples in syncmode
/// If the core is not in sync mode, this should throw an InvalidOperationException
///
void GetSamplesSync(out short[] samples, out int nsamp);
///
/// Provides samples in async mode
/// If the core is not in async mode, this shoudl throw an InvalidOperationException
///
///
void GetSamplesAsync(short[] samples);
///
/// Discards stuff, is there anything more to say here?
///
void DiscardSamples();
}
}