예제 #1
0
        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;
        }
예제 #2
0
        private unsafe SndFile([NotNull] SndFile__ *file, SfInfo info)
        {
            if (file == null)
            {
                throw new ArgumentNullException(nameof(file));
            }

            Handle = file;
            Info   = info;
        }
예제 #3
0
        internal SfInfo ToInfo()
        {
            var info = new SfInfo
            {
                Format     = (SfFormat__)Major | (SfFormat__)Subtype | (SfFormat__)Endian,
                Channels   = Channels,
                SampleRate = SampleRate
            };

            return(info);
        }
예제 #4
0
 private static extern bool sf_format_check(
     ref SfInfo sfInfo
     );
예제 #5
0
 private static extern unsafe SndFile__ *sf_open_virtual(
     ref SfVirtual @virtual,
     SfMode mode,
     ref SfInfo info,
     IntPtr userData
     );
예제 #6
0
 private static extern unsafe SndFile__ *sf_wchar_open(
     [MarshalAs(UnmanagedType.LPWStr)] string path,
     SfMode mode,
     ref SfInfo info
     );