internal static extern int SoundIoChannelLayoutFindChannel( [In] IntPtr layout, [In] SoundIoChannelId channel );
internal static extern IntPtr SoundIoGetChannelName( [In] SoundIoChannelId id );
internal static extern int soundio_channel_layout_find_channel([CTypeDetails("Pointer<SoundIoChannelLayout>")] System.IntPtr @layout, SoundIoChannelId @channel);
internal static extern System.IntPtr soundio_get_channel_name(SoundIoChannelId @id);
/// <summary> /// Searches for <see cref="SoundIoChannelId"/> object within <see cref="SoundIoChannelLayout"/> /// and returns zero-based index of element found. /// </summary> /// <param name="channel">Channel id to search for.</param> /// <returns>Zero-based index of object or -1 if not found.</returns> public int FindChannel(SoundIoChannelId channel) { return(NativeMethods.SoundIoChannelLayoutFindChannel(handle, channel)); }
/// <summary> /// Retrieves name string for specified channel id. /// </summary> /// <param name="id">Channel id for which to retrieve value.</param> /// <returns>Name of specified channel id.</returns> public static string GetChannelName(this SoundIoChannelId id) { return(Marshal.PtrToStringAnsi(NativeMethods.SoundIoGetChannelName(id))); }