Commits

Leonard Ritter committed c03b0ff

added alGetSourcef

Comments (0)

Files changed (1)

         ptr = _ffi.new('unsigned char[]', data)
     else: # str
         ptr = _ffi.new('char[{}]'.format(len(data)), data)
-    _alBufferData(buffer, format, ptr, len(ptr), freq)
+    _alBufferData(buffer, format, ptr, _ffi.sizeof(ptr), freq)
 
 def alListenerfv(enum, values):
     _alListenerfv(enum, values)    
     _alGetSourcei(source, pname, value)
     return value[0]
 
+def alGetSourcef(source, pname):
+    value = _ffi.new('ALfloat *')
+    _alGetSourcef(source, pname, value)
+    return value[0]
+
 alcDestroyContext = _alcDestroyContext
 alcCloseDevice = _alcCloseDevice