예제 #1
0
 def delete(self):
     return
     # XXX TODO crashes
     context.lock()
     al.alDeleteSources(1, self._al_source)
     context.unlock()
     self._al_source = None
예제 #2
0
 def delete(self):
     return
     # XXX TODO crashes
     context.lock()
     al.alDeleteSources(1, self._al_source)
     context.unlock()
     self._al_source = None
예제 #3
0
 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 = {}
예제 #4
0
    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()
예제 #5
0
파일: __init__.py 프로젝트: arokem/Fos
    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()
예제 #6
0
파일: __init__.py 프로젝트: cb109/maxstick
    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
예제 #7
0
    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
예제 #8
0
    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()