|
2010-04-24
, 21:34
|
|
Posts: 1,366 |
Thanked: 1,185 times |
Joined on Jan 2006
|
#12
|
FREQ = 18000 # play with this for best sound BITSIZE = -16 # here unsigned 16 bit CHANNELS = 2 # 1 is mono, 2 is stereo BUFFER = 100 # audio buffer size, number of samples self.mymixer=pg.mixer.init(FREQ, BITSIZE, CHANNELS, BUFFER) # create a new Sound object from a file self.sound1=pg.mixer.Sound("stylo_smpl/d3.wav") self.sound2=pg.mixer.Sound("stylo_smpl/c4.wav") def on_pushButton_2_pressed(self): self.sound1.play(-1) def on_pushButton_2_released(self): self.sound1.stop()
N900_Email_Options Wiki Page