1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

* added workaround for sound (SDL)

git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@218 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
skomoroh 2008-02-09 23:24:03 +00:00
parent 95397282c5
commit 7f54db1127

View file

@ -430,6 +430,16 @@ class PyGameAudioClient(AbstractAudioClient):
# for py2exe
import pygame.base, pygame.rwobject, pygame.mixer_music
self.mixer = pygame.mixer
## http://www.pygame.org/docs/ref/mixer.html
## NOTE: there is currently a bug on some windows machines which
## makes sound play back 'scratchy'. There is not enough cpu in
## the sound thread to feed the buffer to the sound api. To get
## around this you can increase the buffer size. However this
## means that there is more of a delay between the time you ask to
## play the sound and when it gets played. Try calling this before
## the pygame.init or pygame.mixer.init calls.
## pygame.mixer.pre_init(44100,-16,2, 1024 * 3)
self.mixer.pre_init(44100, -16, 2, 1024 * 3)
self.mixer.init()
self.music = self.mixer.music
self.time = pygame.time