#7248 NORM Update.: Speaker device has inconsistent behavior

Zarro Boogs per Child bugtracker at laptop.org
Thu Jun 12 08:31:10 EDT 2008


#7248: Speaker device has inconsistent behavior
---------------------+------------------------------------------------------
  Reporter:  Eben    |       Owner:  mtd                              
      Type:  defect  |      Status:  new                              
  Priority:  normal  |   Milestone:  Update.2 (8.2.0)                 
 Component:  sugar   |     Version:  Development build as of this date
Resolution:          |    Keywords:                                   
  Verified:  0       |    Blocking:                                   
 Blockedby:          |  
---------------------+------------------------------------------------------

Comment(by mtd):

 Replying to [comment:2 Eben]:
 > Replying to [comment:1 mtd]:
 > > Replying to [ticket:7248 Eben]:
 > > > After updating to the latest joyride, I'm noticing a number of
 inconsistencies in the behavior of the speaker device:
 > > >
 > > >  1. The speaker icon only ever appears at the 000 and 100 levels;
 the intermediate levels all appear as 100.
 > >
 > > 1. Should be easy -- appears to be a problem with get_icon_state() or
 how I'm calling it, as I'm certainly asking it for the icon to do with the
 current volume level
 >
 > Is the string passed accurate?  Maybe there is an off-by-one or some
 rounding error?

 Yup, it's a limitation of sugar-toolkit/graphics/icon.get_icon_name -
 we've speaker-0{33,66}.svg, but it steps from the current volume up to 100
 by steps of 5, so it'll never find either of those files (it'll look for
 -030, -035 and -065, -070.svg, etc.).  I've already submitted patches to
 fix this.  I think I didn't pick this up in testing because when I
 developed this, the -033 and -066 icon files were the same as -100, and
 then when you fixed them I didn't bother re-testing the code.  Whoops.

 > > >  2. Frequently, after having muted the speakers, the simple act of
 revealing the palette for the device will un-mute it unintentionally.
 > >
 > >
 > > 2. Not sure what's going on here but it sounds like some brain dead
 error in the code that should be easy to fix
 >
 > I wish I could discover some causality for this, since it only happens
 about half the time.  I imagine it should be relatively easy to debug,
 though.

 I can reproduce and it must be something stupid.  Will get to it by
 tomorrow.  It's particularly horrible behavior now, sorry.

 > > >  3. On occasions when I can reveal the palette without un-muting it,
 I find that dragging the volume slider a) only occasionally changes the
 appearance of the icon back to un-muted (colored) and b) never changes the
 Un-mute menu option back to Mute.
 > >
 > >
 > > 3. I am probably mis-remembering, but I thought we agreed that the
 volume level and the mute status are orthogonal.  so 3a) is probably a
 symptom of 2), and 3b) is due to the chosen mute icon / text not being
 updated when the slider is moved as the slider should have no effect on
 the mute status.  If I fix 2 do you think this will become a non-issue, or
 would you like the mute status to go to True if the volume slider is set
 to 0 and the mute status to go to False if the volume slider is set to
 anything above 0?
 >
 > Hmmm, I do remember that discussion.  After toying with it, though, I
 think what I really want is a unidirectional association.  That is,
 toggling mute on/off should have absolutely no effect on the volume.
 However, I think that explicitly adjusting the volume (either by adjusting
 the slider, or pressing the volume keys) should always un-mute the
 speakers.

 Understood...easy enough to do.

 > > >  4. The volume slider does not respond when the volume keys are
 pressed while the palette is shown.
 > >
 > > 4. This is indeed a consequence of the fact we have to poll the mixer
 device to get the volume [[...]]
 >
 > Yeah.  Hold off on this one for now.  It sounds ugly, and it's certainly
 an edge case.

 Cool.

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


More information about the Bugs mailing list