2018-02-14 08:55:18

Hello all,
I think I will be asking a lot of questions related to this topic in future so I'm making a central topic for all my questions rather than posting a new topic each time.
SO after making games in BGT and grasping programming concepts, I'm wanting to switch from BGT to python. I did some researches on google and found python game libraries along with accessible_output2. All is working well till now, I got the window up and running on the screen and I have a menu with speech. The only concern is sound. The game I'm making feels laggy and I suspect it's due to pygame's sound capabilities not beeing so good. Therefore, I'm wanting to rewrite my sound module in sound_lib or libaudioverse but I'm not able to understand how to get started in it. Could anyone help me regarding this matter? just a small example in both of these libraries maybe?
Regards,
Amit

There once was a moviestar icon.
Who prefered to sleep with the light on.
They learnt how to code, devices sure glowed,
and lit the night using python.

2018-02-14 13:46:09

I have faced the same problem using Pygame and Pygame.mixer.
You can fix it by putting this line, before the pygame.init() call:
pygame.mixer.pre_init(44100, -16, 2, 1024)

This will decrease the buffer size that pygame allocates for each sound and will fix the lag.

2018-02-14 18:35:55

HI,
Thanks for replying. I've tried this but it seems it did not work.
Regards,
Amit

There once was a moviestar icon.
Who prefered to sleep with the light on.
They learnt how to code, devices sure glowed,
and lit the night using python.