Пример #1
0
        // ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );

        /// <summary>This function returns pointers to strings related to the context.</summary>
        /// <remarks>
        /// ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.
        /// ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.
        /// ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details.
        /// ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.
        /// ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
        /// </remarks>
        /// <param name="device">a pointer to the device to be queried.</param>
        /// <param name="param">an attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS</param>
        /// <returns>A string containing the name of the Device.</returns>
        public static string GetString(IntPtr device, AlcGetString param)
        {
            IntPtr pstr = GetStringPrivate(device, param);
            string str  = String.Empty;

            if (pstr != IntPtr.Zero)
            {
                str = Marshal.PtrToStringAnsi(pstr);
            }
            return(str);
        }
Пример #2
0
        public static string GetString(IntPtr device, AlcGetString param)
        {
            var    pstr = GetStringPrivate(device, param);
            string str;

            if (pstr != IntPtr.Zero)
            {
                str = Marshal.PtrToStringAnsi(pstr);
            }
            else
            {
                str = string.Empty;
            }

            Debug.Assert(str != null, nameof(str) + " != null");

            return(str);
        }
Пример #3
0
 public static string GetString(IntPtr device, AlcGetString param)
 {
     return(Marshal.PtrToStringAnsi(Alc.GetStringPrivate(device, param)));
 }
Пример #4
0
 private static IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
Пример #5
0
 internal static string GetString(IntPtr device, AlcGetString p)
 {
     return(GetString(device, (int)p));
 }
Пример #6
0
 public static extern string GetString([In] ALDevice device, AlcGetString param);
Пример #7
0
 public static extern unsafe byte *GetStringPtr([In] ALDevice device, AlcGetString param);
Пример #8
0
        // ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );

        /// <summary>This strings related to the context.</summary>
        /// <remarks>
        /// ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.
        /// ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.
        /// ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details.
        /// ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.
        /// ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
        /// </remarks>
        /// <param name="device">A pointer to the device to be queried.</param>
        /// <param name="param">An attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS.</param>
        /// <returns>A string containing the name of the Device.</returns>
        [DllImport(Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = AlcCallingConv, CharSet = CharSet.Ansi)][return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string GetString([In] ALDevice device, AlcGetString param);
Пример #9
0
        // ALC_API ALCenum         ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );

        /// <summary>This strings related to the context.</summary>
        /// <remarks>
        /// ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.
        /// ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.
        /// ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details.
        /// ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.
        /// ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
        /// </remarks>
        /// <param name="device">A pointer to the device to be queried.</param>
        /// <param name="param">An attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS.</param>
        /// <returns>A string containing the name of the Device.</returns>
        [DllImport(Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = AlcCallingConv, CharSet = CharSet.Ansi)] public static unsafe extern byte *GetStringPtr([In] ALDevice device, AlcGetString param);
Пример #10
0
		public static extern IntPtr alcGetString(IntPtr device, AlcGetString param);
Пример #11
0
 private static IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param) => alcGetString_ptr(device, param);
Пример #12
0
 public static extern IntPtr alcGetString(IntPtr device, AlcGetString param);
Пример #13
0
 private static extern IntPtr GetStringPrivate([In] IntPtr device, [In] AlcGetString param);
Пример #14
0
 public static string GetString(IntPtr device, AlcGetString param)
 {
     return Marshal.PtrToStringAnsi(GetStringPrivate(device, param));
 }
Пример #15
0
 private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);