play_example.py 文件源码

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

项目:python_mp3_decoder 作者: michaelboulton 项目源码 文件源码
def start(self):
        try:
            p = pyaudio.PyAudio()

            self.decoder = Decoder(CHUNK_SIZE*20)

            self.stream = p.open(format=p.get_format_from_width(2),
                                 channels=2,
                                 rate=44100,
                                 output=True)

            yield self.stream
        finally:
            self.stream.stop_stream()
            self.stream.close()

            p.terminate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号