Ejemplo n.º 1
0
        /// <summary>
        /// Set the GUID of a the <paramref name="sndfile"/> WAVEX file to indicate an Ambisonic format.
        /// </summary>
        /// <param name="sndfile">Audio file to set ambisonic format of.</param>
        /// <param name="mode">Ambisonic format to use.</param>
        /// <returns>Success of setting ambisonic format for the given file.</returns>
        public bool SetAmbisonic(IntPtr sndfile, LibsndfileMode mode)
        {
            if (sndfile == IntPtr.Zero)
            {
                throw new ArgumentException("File handle is invalid/closed.");
            }
            if (mode != LibsndfileMode.AmbisonicNone || mode != LibsndfileMode.AmbisonicBFormat)
            {
                throw new ArgumentException("Mode must be set.");
            }

            return(m_Api.SetAmbisonic(sndfile, mode));
        }