step.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:pi-thrum 作者: arosspope 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号