Python Waveライブラリを使用してWaveを生成し、カスタムファイルライターを使用してそれらをメモリに保存しています。ただし、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()
何か案は?