def __soundInit(self):
"""
Initialises the pygame module and loads the sound samples
"""
# Initialise pygame module
pygame.mixer.pre_init(44100, -16, 12, 512) # TODO: Tweak values?
pygame.init()
# Load sounds from samples folder
self.__samples.append(pygame.mixer.Sound('samples/Blop-01.wav'))
self.__samples.append(pygame.mixer.Sound('samples/Glitch-02.wav'))
self.__samples.append(pygame.mixer.Sound('samples/Vocal-03.wav'))
self.__samples.append(pygame.mixer.Sound('samples/Noise-04.wav'))
self.__samples.append(pygame.mixer.Sound('samples/SFX-05.wav'))
self.__samples.append(pygame.mixer.Sound('samples/Strike-06.wav'))
for sample in self.__samples:
sample.set_volume(.95)
评论列表
文章目录