示例#1
0
 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();
 }
示例#2
0
 public static string alcGetString(ALCdevice device, int param) => new string(_alcGetString(device, param));
示例#3
0
 public static void alcGetIntegerv(ALCdevice device, int param, int[] values) => _alcGetIntegerv(device, param, values.Length, values);
示例#4
0
 public static bool alcIsExtensionPresent(ALCdevice device, string extension) => _alcIsExtensionPresent(device, extension);
示例#5
0
 public static ALCcontext alcCreateContext(ALCdevice device, int[] attributes) => _alcCreateContext(device, attributes);
示例#6
0
 public static bool alcCloseDevice(ALCdevice device) => _alcCloseDevice(device);