// 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); }
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); }
public static string GetString(IntPtr device, AlcGetString param) { return(Marshal.PtrToStringAnsi(Alc.GetStringPrivate(device, param))); }
private static IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
internal static string GetString(IntPtr device, AlcGetString p) { return(GetString(device, (int)p)); }
public static extern string GetString([In] ALDevice device, AlcGetString param);
public static extern unsafe byte *GetStringPtr([In] ALDevice device, AlcGetString param);
// 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);
// 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);
public static extern IntPtr alcGetString(IntPtr device, AlcGetString param);
private static IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param) => alcGetString_ptr(device, param);
private static extern IntPtr GetStringPrivate([In] IntPtr device, [In] AlcGetString param);
public static string GetString(IntPtr device, AlcGetString param) { return Marshal.PtrToStringAnsi(GetStringPrivate(device, param)); }
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);