#12677 NORM 13.2.0: Pygame causes ALSA underruns due to small period size on XO-4

Zarro Boogs per Child bugtracker at laptop.org
Wed May 15 08:00:04 EDT 2013


#12677: Pygame causes ALSA underruns due to small period size on XO-4
-------------------------------------------+--------------------------------
           Reporter:  godiard              |       Owner:  dsd   
               Type:  defect               |      Status:  new   
           Priority:  normal               |   Milestone:  13.2.0
          Component:  ofw - open firmware  |     Version:  4-C1  
         Resolution:                       |    Keywords:  pygame
        Next_action:  diagnose             |    Verified:  0     
Deployment_affected:                       |   Blockedby:        
           Blocking:                       |  
-------------------------------------------+--------------------------------

Comment(by godiard):

 Replying to [comment:7 godiard]:
 > Looks like pygame.mixer.init() is called by pygame.init()
 >
 > http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.init
 >
 > Should be good try stop it.

 Reply to myself:

 Adding:

 pygame.mixer.quit()

 after

 pygame.init()

 on olpcgames.canvas(), solves the cpu problem (go to 10% on maze standby
 and 2% on physics).

 A pending issue is at the activity startup, a crispy sound is heard. I am
 testing if using preinit [1], can set a value to not hear the sound at
 all.

 As olpcgames is death as a library, and development has moved to
 sugargames, may be is ok solve the cpu problem in the activities, and
 implement a better solution on sugargames. Sadly, these libraries are
 copy/pasted in the activities using them.


 [1] http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.pre_init

-- 
Ticket URL: <http://dev.laptop.org/ticket/12677#comment:9>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list