using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { /// Functions, structures and constants from Windows Core Audio Api. public static partial class CoreAudio { /// Allows the application to specify which formats are reset. [PInvokeData("audioendpoints.h", MSDNShortId = "7FF7DCF2-0580-4B50-8EA9-87DB9478B1E8")] [Flags] public enum ENDPOINT_RESET { /// Only reset the mix format. The endpoint's device format will not be reset if this flag is set. ENDPOINT_FORMAT_RESET_MIX_ONLY = 0x00000001 } /// Used for resetting the current audio endpoint device format. /// /// This setting is exposed to the user through the "Sounds" control panel and can be read from the endpoint property store using PKEY_AudioEngine_DeviceFormat. /// // https://docs.microsoft.com/en-us/windows/win32/api/audioendpoints/nn-audioendpoints-iaudioendpointformatcontrol [PInvokeData("audioendpoints.h", MSDNShortId = "7FF7DCF2-0580-4B50-8EA9-87DB9478B1E8")] [ComImport, Guid("784CFD40-9F89-456E-A1A6-873B006A664E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IAudioEndpointFormatControl { /// Resets the format to the default setting provided by the device manufacturer. /// /// /// Allows the application to specify which formats are reset. If no flags are set, then this method reevaluates both the /// endpoint's device format and mix format and sets them to their default values. /// /// /// ENDPOINT_FORMAT_RESET_MIX_ONLY: Only reset the mix format. The endpoint's device format will not be reset if this flag is set. /// /// /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. // https://docs.microsoft.com/en-us/windows/win32/api/audioendpoints/nf-audioendpoints-iaudioendpointformatcontrol-resettodefault // HRESULT ResetToDefault( DWORD ResetFlags ); HRESULT ResetToDefault(ENDPOINT_RESET ResetFlags); } } }