internal SfFormat(SfInfo info) { var format = info.Format; Major = (SfFormatMajor)(format & SfFormat__.SF_FORMAT_TYPEMASK); Subtype = (SfFormatSubtype)(format & SfFormat__.SF_FORMAT_SUBMASK); Endian = (SfFormatEndian)(format & SfFormat__.SF_FORMAT_ENDMASK); Channels = info.Channels; SampleRate = info.SampleRate; }
private unsafe SndFile([NotNull] SndFile__ *file, SfInfo info) { if (file == null) { throw new ArgumentNullException(nameof(file)); } Handle = file; Info = info; }
internal SfInfo ToInfo() { var info = new SfInfo { Format = (SfFormat__)Major | (SfFormat__)Subtype | (SfFormat__)Endian, Channels = Channels, SampleRate = SampleRate }; return(info); }
private static extern bool sf_format_check( ref SfInfo sfInfo );
private static extern unsafe SndFile__ *sf_open_virtual( ref SfVirtual @virtual, SfMode mode, ref SfInfo info, IntPtr userData );
private static extern unsafe SndFile__ *sf_wchar_open( [MarshalAs(UnmanagedType.LPWStr)] string path, SfMode mode, ref SfInfo info );