#5215 NORM Never A: Sound doesn't work in SimCity in Ship.2

Zarro Boogs per Child bugtracker at laptop.org
Fri Nov 30 04:09:49 EST 2007


#5215: Sound doesn't work in SimCity in Ship.2
--------------------+-------------------------------------------------------
 Reporter:  gnu     |       Owner:  jg                               
     Type:  defect  |      Status:  new                              
 Priority:  normal  |   Milestone:  Never Assigned                   
Component:  distro  |     Version:  Development build as of this date
 Keywords:          |    Verified:  0                                
--------------------+-------------------------------------------------------
 os646, q2D05, B4.

 When running Simcity-4.xo (see http://wiki.laptop.org/go/SimCity), no
 sounds come out for a long time.  Eventually, after switching Sugar
 activities, occasionally a bunch of sounds will pop out all at once.

 This same build of !SimCity works today on 623 without trouble.  (As did
 Simcity-3.xo; the -4 version just removes some fonts and adds a few lines
 of comments.)

 To reproduce, install !SimCity by downloading it in the web browser.  Once
 it's arrived, bring up the frame, navigate along the bottom bar til the
 cityscape !SimCity logo appears, and click on it.  You'll get the splash
 screen, then a pick-a-city screen.  Click "Play this Map".  You'll get the
 main screen.  In the center column are a bunch of graphical buttons.
 Clicking on each of these should produce a sound, e.g. clicking on the "R"
 with a house on it should say, "Residential".  Clicking on the big one at
 the bottom of the column should say, "Airport".  These sounds should come
 out instantly, but they do not.  In some cases, they come out more than 60
 seconds later; in others, they come out many minutes later, or not at all.

 !SimCity uses a python thread to handle all its sound requests.  Its
 simulator C code just spits out strings to that small thread, e.g. "Play
 residential.wav".  The Python code calls on pygame.mixer.init to
 initialize, and the thread calls e.g.
 pygame.mixer.Sound("residential.wav").play() to play each sound.
 Pygame.mixer is apparently creating yet another thread to sequence and mix
 these sounds.  This really simple code hasn't changed.  It is in
 /home/olpc/Activities/simcity.activity/simcityactivity.py.

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



More information about the Bugs mailing list