def driver_init(device_name=None): global _device global _have_1_1 # TODO devices must be enumerated on Windows, otherwise 1.0 context is # returned. _device = alc.alcOpenDevice(device_name) if not _device: raise Exception("No OpenAL device.") alcontext = alc.alcCreateContext(_device, None) alc.alcMakeContextCurrent(alcontext) if have_version(1, 1): # Good version info to cache _have_1_1 = True # See issue #163. import sys if sys.platform in ("win32", "cygwin"): from pyglet import clock clock.Clock._force_sleep = True
def __init__(self): #load device/context/listener self.device = alc.alcOpenDevice(None) self.context = alc.alcCreateContext(self.device, None) alc.alcMakeContextCurrent(self.context) alc.alcProcessContext(self.context) #get list of capture devices self.cap_devices = self.parse( alc.alcGetString(None, alc.ALC_CAPTURE_DEVICE_SPECIFIER)) #capture device container self.captureDev = None #main buffer self.samplescaptured = ''
def __init__(self): #load device/context/listener self.device = alc.alcOpenDevice(None) self.context = alc.alcCreateContext(self.device, None) alc.alcMakeContextCurrent(self.context) #get list of available htrf tables self.hrtf_buffers = [alc.ALCint(), alc.ALCint * 4, alc.ALCint()] alc.alcGetIntegerv(self.device, alc.ALC_NUM_HRTF_SPECIFIERS_SOFT, 1, self.hrtf_buffers[0]) #attributes for device to set specified hrtf table self.hrtf_select = self.hrtf_buffers[1](alc.ALC_HRTF_SOFT, alc.ALC_TRUE, alc.ALC_HRTF_ID_SOFT, 1)
def driver_init(device_name = None): global _device global _is_init global _have_1_1 # TODO devices must be enumerated on Windows, otherwise 1.0 context is # returned. _device = alc.alcOpenDevice(device_name) if not _device: raise Exception('No OpenAL device.') alcontext = alc.alcCreateContext(_device, None) alc.alcMakeContextCurrent(alcontext) _is_init = True if have_version(1, 1): # Good version info to cache _have_1_1 = True
def driver_init(device_name=None): global _device global _have_1_1 # TODO devices must be enumerated on Windows, otherwise 1.0 context is # returned. _device = alc.alcOpenDevice(device_name) if not _device: raise Exception('No OpenAL device.') alcontext = alc.alcCreateContext(_device, None) alc.alcMakeContextCurrent(alcontext) if have_version(1, 1): # Good version info to cache _have_1_1 = True # See issue #163. import sys if sys.platform in ('win32', 'cygwin'): from pyglet import clock clock.Clock._force_sleep = True
def __init__(self): self.device = alc.alcOpenDevice(None) self.context = alc.alcCreateContext(self.device, None) self._position = (0, 0, 0) self._orientation = (0, 0, 0) alc.alcMakeContextCurrent(self.context)
def __init__(self): # load device/context/listener self.device = alc.alcOpenDevice(None) self.context = alc.alcCreateContext(self.device, None) alc.alcMakeContextCurrent(self.context)
def __init__(self): #load device/context/listener self.device = alc.alcOpenDevice(None) self.context = alc.alcCreateContext(self.device, None) alc.alcMakeContextCurrent(self.context)