def delete(self): return # XXX TODO crashes context.lock() al.alDeleteSources(1, self._al_source) context.unlock() self._al_source = None
def delete(self): """Delete all sources and free all buffers""" assert context._lock.locked() for source, buffers in self._sources.items(): al.alDeleteSources(1, ctypes.byref(ctypes.c_uint(source))) for b in buffers: if not al.alIsBuffer(b): # Protect against implementations that DO free buffers # when they delete a source - carry on. if _debug_buffers: print("Found a bad buffer") continue al.alDeleteBuffers(1, ctypes.byref(b)) for b in self._buffers: al.alDeleteBuffers(1, ctypes.byref(b)) self._buffers = [] self._sources = {}
def delete(self): if _debug: print 'OpenALAudioPlayer.delete()' if not self._al_source: return context.worker.remove(self) self._lock.acquire() context.lock() al.alDeleteSources(1, self._al_source) context.unlock() self._al_source = None self._lock.release()
def delete(self): if _debug: print "OpenALAudioPlayer.delete()" if not self._al_source: return context.worker.remove(self) self._lock.acquire() context.lock() al.alDeleteSources(1, self._al_source) context.unlock() self._al_source = None self._lock.release()
def delete(self): if _debug: print 'OpenALAudioPlayer.delete()' if not self._al_source: return context.worker.remove(self) with self._lock: with context.lock: al.alDeleteSources(1, self._al_source) bufferPool.deleteSource(self._al_source) if _debug_buffers: error = al.alGetError() if error != 0: print("DELETE ERROR: " + str(error)) self._al_source = None
def delete(self): if _debug: print "OpenALAudioPlayer.delete()" if not self._al_source: return context.worker.remove(self) self._lock.acquire() context.lock() al.alDeleteSources(1, self._al_source) bufferPool.deleteSource(self._al_source) if _debug_buffers: error = al.alGetError() if error != 0: print ("DELETE ERROR: " + str(error)) context.unlock() self._al_source = None self._lock.release()