Re: Wich library to using in Python?
I've not used libaudioverse so I can't say whether there's an issue with it or not. I have encountered something similar with Pyglets build in OpenAL functions at times, I think it may have had to do with the audio samples themselves, though i'm not sure.
Here's that example:
import pyglet
from pyglet.window import key
#create window
window = pyglet.window.Window(640,480,caption='Example')
#clear window
window.clear()
#key input container
key_input = []
#load sound
sound = pyglet.media.load('example.wav',streaming=False)
#load image
picture = pyglet.image.load('example.png')
#main update loop @window.event def update(dt): global key_input #play sound if 'SPACE press' in key_input: sound.play() #quit program if 'ESCAPE press' in key_input: window.close() #purge key presses for next update if len(key_input) > 0: key_input = [] #capture key presses @window.event def on_key_press(symbol,modifiers): key_input.append(key.symbol_string(symbol) + " press") print key.symbol_string(symbol) + " press" #capture key releases @window.event def on_key_release(symbol,modifiers): key_input.append(key.symbol_string(symbol) + " release") print key.symbol_string(symbol) + " release" #draw window @window.event() def on_draw(): window.clear() picture.blit(0,0) #schedule and run update function pyglet.clock.schedule_interval(update, .01) pyglet.app.run()
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector