?
=?ISO-8859-1?Q?I=F1igo?=
Hello again:
I was making some tests with pygame and I have written a very small
piece of code, just to test if it really works right. The code is this:
import os
import pygame
def load_sound(name):
pygame.mixer.init()
if os.path.exists(name) != False:
sound= pygame.mixer.Sound(name)
print sound.get_num_channels()
sound.set_volume(0.5)
sound.play(1, 10)
print sound.get_num_channels()
return sound
else:
print 'File does not exist:', name
return 0
explode1= load_sound("Sun.wav")
The thing is I do not get any error message but it does not play Sun.wav
file. Any idea?
\0\0\0
I was making some tests with pygame and I have written a very small
piece of code, just to test if it really works right. The code is this:
import os
import pygame
def load_sound(name):
pygame.mixer.init()
if os.path.exists(name) != False:
sound= pygame.mixer.Sound(name)
print sound.get_num_channels()
sound.set_volume(0.5)
sound.play(1, 10)
print sound.get_num_channels()
return sound
else:
print 'File does not exist:', name
return 0
explode1= load_sound("Sun.wav")
The thing is I do not get any error message but it does not play Sun.wav
file. Any idea?
\0\0\0