Posts: 8

Hi there. Yesterday That i was trying to do some simple stuff with libaudioverse, I found out if I use the += operater, Handling key presses will faile. I used pyglet to handle them and make the window. So does anyone know what is the reason and how can it be done?I use C# to develop stuff but since i heard the libaudioverse's HRTF pannings and environment creater, I surprized and since i got some experiences in python i decided to give it try,

I don't get any errors at all! Application runs correctly, Just if I have a += oprater in a key press if condition block, Other key press conditions won't work too. My code is here:import pygletimport libaudioverseimport timeimport sysimport Tolklibaudioverse.initialize()from pyglet.window import keyTolk.load()window=pyglet.window.Window()server=libaudioverse.Server()#Let's have a buffer herebuffer=libaudioverse.Buffer(server)#now we load a file to use laterbuffer.load_from_file("sound.ogg")#Now the buffernodebp=libaudioverse.BufferNode(server)#Now we tell our buffernode what is its bufferbp.buffer=buffer#Buffernode loopingbp.looping=True

You'd be surprised at just how often a typo or something stupid like that can trip up even the most experienced programmer for hours on end. Hm, another possibility might be your use of globals, you usually have to specify globals when using them inside functions because of the local/non-local way python handles variables, are you using python 2.x or 3.x?