View Single Post
  #6  
Old 11-26-2007, 01:24 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can change the value of MAX_SAMPLES anytime you want. If you want to set it in your callback then you can do the following:
Code:
def onKeyDown(key):
	global samples, MAX_SAMPLES
	if key == ' ':
		#Clear samples and start timer
		samples = 0
		MAX_SAMPLES = 45 * 30
		viz.starttimer(1,SAMPLE_RATE)

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)
Reply With Quote