Re: [pygame] noob questions about creating and playing sounds
For the crackle, are you using the latest version of pygame? I know a certain version had problems on win32. On Wed, Jul 22, 2009 at 12:32 AM, Ian Mallett geometr...@gmail.com wrote: Hi again, Hmmm, the note of your original approach is the same, but the timbre is different. Mine matches a sine wave made with Audacity for tone. I notice mine has less crackle than the original--but it's still there. The issue then is that crackle... I thought the issue might be the buffer size. (the buffer size default for pre_init is 0, while for init it 3072. I don't know if the pre_init changes anything that way. Changing it didn't work, however. As an aside, pygame.sndarray.samples(...) doesn't seem to work unless the mixer is intitialized in stereo... I looked at the array manually, but didn't notice anything weird--although there's A LOT of values... It's good you got a solution though. Ian -- Jake
Re: [pygame] noob questions about creating and playing sounds
On Wed, Jul 22, 2009 at 12:46 PM, Jake bninmonk...@gmail.com wrote: For the crackle, are you using the latest version of pygame? I know a certain version had problems on win32. I am using: * Pygame 1.8.1 * Python 2.6.2 * Xubuntu 9.04 Jaunty Jackalope * Linux 2.6.28-13.45 * ALSA 1.0.18 It would be interesting to know, if the posted code examples produce that noise on your machine :)
Re: [pygame] noob questions about creating and playing sounds
On Wed, Jul 22, 2009 at 10:25 AM, Jerzy Jalocha N jjalo...@gmail.comwrote: I am using: * Pygame 1.8.1 * Python 2.6.2 * Xubuntu 9.04 Jaunty Jackalope * Linux 2.6.28-13.45 * ALSA 1.0.18 I am using PyGame 1.8.1 Python 2.5.4 Vista (Win32)
Re: [pygame] main game object using singleton/global/static?
Is there a shortcut or easier way than what I am doing? Because having to use the same reference in every object seems redundant? I am using a I feel I am spamming self. A lot of my classes have a lot of self. lines Example of random code: class Unit(): def onCollide(self, other): if self.modifiedHP() - other.damage() 0: self.die() self.game.playsound(boom) self.game.spawn(item) So I'm looking for advice on if this is normal? Or bad code? -- Jake