示例#1
0
 public bool SupportsChannelCount(int channelCount)
 {
     return(Natives.soundio_device_supports_layout(handle, SoundIOChannelLayout.GetDefault(channelCount).Handle));
 }
示例#2
0
 public void Dispose()
 {
     Natives.soundio_ring_buffer_destroy(handle);
 }
示例#3
0
 public void AdvanceWritePointer(int count)
 {
     Natives.soundio_ring_buffer_advance_write_ptr(handle, count);
 }
示例#4
0
 public static SoundIOChannelLayout GetBuiltIn(int index)
 {
     return(new SoundIOChannelLayout(Natives.soundio_channel_layout_get_builtin(index)));
 }
示例#5
0
 internal SoundIOException(SoundIoError errorCode)
     : base(Marshal.PtrToStringAnsi(Natives.soundio_error_name(errorCode)))
 {
 }
示例#6
0
 public static int GetBytesPerFrame(SoundIOFormat format, int channelCount)
 {
     return(Natives.soundio_get_bytes_per_frame((SoundIoFormat)format, channelCount));
 }
示例#7
0
 public static string GetSoundFormatName(SoundIOFormat format)
 {
     return(Marshal.PtrToStringAnsi(Natives.soundio_format_string((SoundIoFormat)format)));
 }
示例#8
0
 public SoundIOBackend GetBackend(int index)
 {
     return((SoundIOBackend)Natives.soundio_get_backend(handle, index));
 }
示例#9
0
 public SoundIODevice GetOutputDevice(int index)
 {
     return(new SoundIODevice(Natives.soundio_get_output_device(handle, index)));
 }
示例#10
0
 public SoundIOOutStream CreateOutStream()
 {
     return(new SoundIOOutStream(Natives.soundio_outstream_create(handle)));
 }
示例#11
0
 public SoundIO()
 {
     handle = Natives.soundio_create();
 }
示例#12
0
 public SoundIOInStream CreateInStream()
 {
     return(new SoundIOInStream(Natives.soundio_instream_create(handle)));
 }
示例#13
0
 public int GetNearestSampleRate(int sampleRate)
 {
     return(Natives.soundio_device_nearest_sample_rate(handle, sampleRate));
 }
示例#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)));
        }
示例#15
0
 public static bool HaveBackend(SoundIOBackend backend)
 {
     return(Natives.soundio_have_backend((SoundIoBackend)backend));
 }
示例#16
0
 public void Disconnect()
 {
     Natives.soundio_disconnect(handle);
 }
示例#17
0
 public static int GetBytesPerSample(SoundIOFormat format)
 {
     return(Natives.soundio_get_bytes_per_sample((SoundIoFormat)format));
 }
示例#18
0
 public void FlushEvents()
 {
     Natives.soundio_flush_events(handle);
 }
示例#19
0
 public static int GetBytesPerSecond(SoundIOFormat format, int channelCount, int sampleRate)
 {
     return(Natives.soundio_get_bytes_per_second((SoundIoFormat)format, channelCount, sampleRate));
 }
示例#20
0
 public void WaitEvents()
 {
     Natives.soundio_wait_events(handle);
 }
示例#21
0
 public void ClearBuffer()
 {
     _ = Natives.soundio_outstream_clear_buffer(handle);
 }
示例#22
0
 public void Wakeup()
 {
     Natives.soundio_wakeup(handle);
 }
示例#23
0
        public static SoundIOChannelLayout GetDefault(int channelCount)
        {
            var handle = Natives.soundio_channel_layout_get_default(channelCount);

            return(new SoundIOChannelLayout(handle));
        }
示例#24
0
 public void ForceDeviceScan()
 {
     Natives.soundio_force_device_scan(handle);
 }
示例#25
0
 public void Clear()
 {
     Natives.soundio_ring_buffer_clear(handle);
 }
示例#26
0
 public SoundIORingBuffer CreateRingBuffer(int capacity)
 {
     return(new SoundIORingBuffer(Natives.soundio_ring_buffer_create(handle, capacity)));
 }
示例#27
0
 public void AdvanceReadPointer(int count)
 {
     Natives.soundio_ring_buffer_advance_read_ptr(handle, count);
 }
示例#28
0
 public static string GetBackendName(SoundIOBackend backend)
 {
     return(Marshal.PtrToStringAnsi(Natives.soundio_backend_name((SoundIoBackend)backend)));
 }
示例#29
0
 public void Dispose()
 {
     Natives.soundio_instream_destroy(handle);
 }
示例#30
0
 public bool SupportsSampleRate(int sampleRate)
 {
     return(Natives.soundio_device_supports_sample_rate(handle, sampleRate));
 }