1
我生成使用Python Wave庫波,並使用自定義文件作家將它們存儲在內存中。但是,每當我嘗試用Pygame播放它們時,播放速度都極其緩慢。如果我救完全相同的對象到一個文件中,然後回放,pygame的播放它以正常速度。Pygame的內存波回放
的(有人略)代碼:
pygame.init()
pygame.mixer.init(size=8, buffer=2048, frequency=44100) #Thats the correct freq, but it does the same regardless
x = pygame.mixer.Sound(obj) #Load the output of the wave writer
x.play()
任何想法?