public AudioDevice() { _device = alcOpenDevice(null); _context = alcCreateContext(_device, null); alcMakeContextCurrent(_context); alHandleError("failed to setup open al context: "); if (alcIsExtensionPresent(_device, "ALC_EXT_EFX") == false) { throw new NotSupportedException("your system does not support open al efx extension"); } alHandleError("failed to setup open al: "); UpdateDistanceModel(); UpdateSpeedOfSound(); }
public static string alcGetString(ALCdevice device, int param) => new string(_alcGetString(device, param));
public static void alcGetIntegerv(ALCdevice device, int param, int[] values) => _alcGetIntegerv(device, param, values.Length, values);
public static bool alcIsExtensionPresent(ALCdevice device, string extension) => _alcIsExtensionPresent(device, extension);
public static ALCcontext alcCreateContext(ALCdevice device, int[] attributes) => _alcCreateContext(device, attributes);
public static bool alcCloseDevice(ALCdevice device) => _alcCloseDevice(device);