Re: Lightweight OpenAL Python Wrapper

@8
Yes, absolutely. You can position a player at the same location as the listener, which would play it without rolloff or panning applied.

@9
Hm, digging into the bindings of the wrapper it seems that the listeners position is set by alListener3f, which expects 3 values, but that the orientation is set with alListenerfv which expects a pointer to a ctypes float array. The C based example code in the OpenAL documentation puts it like this:

ALfloat listenerOri[]={0.0,0.0,-1.0, 0.0,1.0,0.0}; 

// Orientation ... 
alListenerfv(AL_ORIENTATION,listenerOri); 

So, the Python equivalent might look something like this:

test = [1.456,1.54,1.88, 0.4,2.23,0.1]
test = ctypes.pointer((ctypes.c_float * len(test))(*test))

al.alListenerfv(al.AL_ORIENTATION,test[0])

I haven't had the opportunity to test this out though, so grain of salt and all that.

The actual handler classes included in it don't have all the features implemented, it actually disables source relative in the player by default but didn't have the function to change that, oops. I've cleaned it up a bit and fixed some of the python 3 bugs, and put in a source relative toggle setting. I might go over it a bit later to make the handler classes more feature complete for the listener and player cone orientation settings and such. Note that the OpenAL32.dll version packed with it is the 32 bit version, if your running 64 bit python you'll need to grab the 64 bit version from OpenAL-Soft.

@10
I haven't played around much with ogg, but it should be possible to decode it with something like [PyOgg] and pass it to an OpenAL buffer for playback. I might play around more with that later and see how it goes.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : NicklasMCHD via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : NicklasMCHD via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector

Reply via email to