wxMediaCtrl::SetVolume bug

Vadim Zeitlin vadim at wxwidgets.org
Wed Oct 3 15:23:09 PDT 2007


On Tue, 2 Oct 2007 18:54:07 -0700 Terry Farnham <TerryF at PipeWorks.Com> wrote:

TF> As you requested, I tested this version and an input dVolume=0.0 results
TF> in an lVolume of -16000 which is again outside the range documented by
TF> microsoft (-10000 to 0).  

 Indeed, sorry for not noticing it. But then I thought this was an already
fixed version and so didn't bother to check it (and in fact this is
apparently an even older and yet more buggy version).

TF> I agree, there is a bit of strangeness with the various flavors of
TF> mediactrl.  When I first decided to debug, I naively set my breakpoints
TF> in mediactrl.cpp.  The "FIXME FIXME FIXME" in it's comments do, however,
TF> indicate to me that it is under construction.

 I'll replace 125 with 100 in this code for now but it's still rather
unclear why is this the correct thing to do. Granted, it does manage to map
wx volume 0 and 1 to -10000 and 0 respectively. But why does it use 10^(-5)
and 2000 for the calculations? I don't see how does it really correspond to
Windows Media Player scale but maybe I'm missing something...

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list