Beispiel #1
0
 public bool SupportsChannelCount(int channelCount)
 {
     return(Natives.soundio_device_supports_layout(handle, SoundIOChannelLayout.GetDefault(channelCount).Handle));
 }
Beispiel #2
0
 public void Dispose()
 {
     Natives.soundio_ring_buffer_destroy(handle);
 }
Beispiel #3
0
 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)));
 }
Beispiel #5
0
 internal SoundIOException(SoundIoError errorCode)
     : base(Marshal.PtrToStringAnsi(Natives.soundio_error_name(errorCode)))
 {
 }
Beispiel #6
0
 public static int GetBytesPerFrame(SoundIOFormat format, int channelCount)
 {
     return(Natives.soundio_get_bytes_per_frame((SoundIoFormat)format, channelCount));
 }
Beispiel #7
0
 public static string GetSoundFormatName(SoundIOFormat format)
 {
     return(Marshal.PtrToStringAnsi(Natives.soundio_format_string((SoundIoFormat)format)));
 }
Beispiel #8
0
 public SoundIOBackend GetBackend(int index)
 {
     return((SoundIOBackend)Natives.soundio_get_backend(handle, index));
 }
Beispiel #9
0
 public SoundIODevice GetOutputDevice(int index)
 {
     return(new SoundIODevice(Natives.soundio_get_output_device(handle, index)));
 }
Beispiel #10
0
 public SoundIOOutStream CreateOutStream()
 {
     return(new SoundIOOutStream(Natives.soundio_outstream_create(handle)));
 }
Beispiel #11
0
 public SoundIO()
 {
     handle = Natives.soundio_create();
 }
Beispiel #12
0
 public SoundIOInStream CreateInStream()
 {
     return(new SoundIOInStream(Natives.soundio_instream_create(handle)));
 }
Beispiel #13
0
 public int GetNearestSampleRate(int sampleRate)
 {
     return(Natives.soundio_device_nearest_sample_rate(handle, sampleRate));
 }
Beispiel #14
0
        // 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)));
        }
Beispiel #15
0
 public static bool HaveBackend(SoundIOBackend backend)
 {
     return(Natives.soundio_have_backend((SoundIoBackend)backend));
 }
Beispiel #16
0
 public void Disconnect()
 {
     Natives.soundio_disconnect(handle);
 }
Beispiel #17
0
 public static int GetBytesPerSample(SoundIOFormat format)
 {
     return(Natives.soundio_get_bytes_per_sample((SoundIoFormat)format));
 }
Beispiel #18
0
 public void FlushEvents()
 {
     Natives.soundio_flush_events(handle);
 }
Beispiel #19
0
 public static int GetBytesPerSecond(SoundIOFormat format, int channelCount, int sampleRate)
 {
     return(Natives.soundio_get_bytes_per_second((SoundIoFormat)format, channelCount, sampleRate));
 }
Beispiel #20
0
 public void WaitEvents()
 {
     Natives.soundio_wait_events(handle);
 }
Beispiel #21
0
 public void ClearBuffer()
 {
     _ = Natives.soundio_outstream_clear_buffer(handle);
 }
Beispiel #22
0
 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));
        }
Beispiel #24
0
 public void ForceDeviceScan()
 {
     Natives.soundio_force_device_scan(handle);
 }
Beispiel #25
0
 public void Clear()
 {
     Natives.soundio_ring_buffer_clear(handle);
 }
Beispiel #26
0
 public SoundIORingBuffer CreateRingBuffer(int capacity)
 {
     return(new SoundIORingBuffer(Natives.soundio_ring_buffer_create(handle, capacity)));
 }
Beispiel #27
0
 public void AdvanceReadPointer(int count)
 {
     Natives.soundio_ring_buffer_advance_read_ptr(handle, count);
 }
Beispiel #28
0
 public static string GetBackendName(SoundIOBackend backend)
 {
     return(Marshal.PtrToStringAnsi(Natives.soundio_backend_name((SoundIoBackend)backend)));
 }
Beispiel #29
0
 public void Dispose()
 {
     Natives.soundio_instream_destroy(handle);
 }
Beispiel #30
0
 public bool SupportsSampleRate(int sampleRate)
 {
     return(Natives.soundio_device_supports_sample_rate(handle, sampleRate));
 }