public bool SupportsChannelCount(int channelCount) { return(Natives.soundio_device_supports_layout(handle, SoundIOChannelLayout.GetDefault(channelCount).Handle)); }
public void Dispose() { Natives.soundio_ring_buffer_destroy(handle); }
public void AdvanceWritePointer(int count) { Natives.soundio_ring_buffer_advance_write_ptr(handle, count); }
public static SoundIOChannelLayout GetBuiltIn(int index) { return(new SoundIOChannelLayout(Natives.soundio_channel_layout_get_builtin(index))); }
internal SoundIOException(SoundIoError errorCode) : base(Marshal.PtrToStringAnsi(Natives.soundio_error_name(errorCode))) { }
public static int GetBytesPerFrame(SoundIOFormat format, int channelCount) { return(Natives.soundio_get_bytes_per_frame((SoundIoFormat)format, channelCount)); }
public static string GetSoundFormatName(SoundIOFormat format) { return(Marshal.PtrToStringAnsi(Natives.soundio_format_string((SoundIoFormat)format))); }
public SoundIOBackend GetBackend(int index) { return((SoundIOBackend)Natives.soundio_get_backend(handle, index)); }
public SoundIODevice GetOutputDevice(int index) { return(new SoundIODevice(Natives.soundio_get_output_device(handle, index))); }
public SoundIOOutStream CreateOutStream() { return(new SoundIOOutStream(Natives.soundio_outstream_create(handle))); }
public SoundIO() { handle = Natives.soundio_create(); }
public SoundIOInStream CreateInStream() { return(new SoundIOInStream(Natives.soundio_instream_create(handle))); }
public int GetNearestSampleRate(int sampleRate) { return(Natives.soundio_device_nearest_sample_rate(handle, sampleRate)); }
// Equality (based on handle and native func) public override bool Equals(object other) { var d = other as SoundIODevice; return(d != null && (this.handle == d.handle || Natives.soundio_device_equal(this.handle, d.handle))); }
public static bool HaveBackend(SoundIOBackend backend) { return(Natives.soundio_have_backend((SoundIoBackend)backend)); }
public void Disconnect() { Natives.soundio_disconnect(handle); }
public static int GetBytesPerSample(SoundIOFormat format) { return(Natives.soundio_get_bytes_per_sample((SoundIoFormat)format)); }
public void FlushEvents() { Natives.soundio_flush_events(handle); }
public static int GetBytesPerSecond(SoundIOFormat format, int channelCount, int sampleRate) { return(Natives.soundio_get_bytes_per_second((SoundIoFormat)format, channelCount, sampleRate)); }
public void WaitEvents() { Natives.soundio_wait_events(handle); }
public void ClearBuffer() { _ = Natives.soundio_outstream_clear_buffer(handle); }
public void Wakeup() { Natives.soundio_wakeup(handle); }
public static SoundIOChannelLayout GetDefault(int channelCount) { var handle = Natives.soundio_channel_layout_get_default(channelCount); return(new SoundIOChannelLayout(handle)); }
public void ForceDeviceScan() { Natives.soundio_force_device_scan(handle); }
public void Clear() { Natives.soundio_ring_buffer_clear(handle); }
public SoundIORingBuffer CreateRingBuffer(int capacity) { return(new SoundIORingBuffer(Natives.soundio_ring_buffer_create(handle, capacity))); }
public void AdvanceReadPointer(int count) { Natives.soundio_ring_buffer_advance_read_ptr(handle, count); }
public static string GetBackendName(SoundIOBackend backend) { return(Marshal.PtrToStringAnsi(Natives.soundio_backend_name((SoundIoBackend)backend))); }
public void Dispose() { Natives.soundio_instream_destroy(handle); }
public bool SupportsSampleRate(int sampleRate) { return(Natives.soundio_device_supports_sample_rate(handle, sampleRate)); }