[Helix-client-dev] Error causes floating point exception in CAudioOutLinuxAlsa::_SetDeviceConfig()

[Helix-client-dev] Error causes floating point exception in CAudioOutLinuxAlsa::_SetDeviceConfig()

Greg Wright gwright at real.com
Tue Apr 28 08:11:07 PDT 2009


Nguyen, Khanh V wrote:
> Hi,
> 
> In the CAudioOutLinuxAlsa::_SetDeviceConfig() method, if there’s an 
> error before the snd_pcm_hw_params_get_period_size(hwparams, 
> &period_size, 0) call, it will skip this call.  When this call is 
> skipped, period_size is zero.  When the calculation for start_threshold 
> started, a floating point exception is thrown because of a 
> divide-by-zero problem. 
> 
>  
> 
> Could someone apply a quick patch for this?  I currently don’t have 
> commit access.

I can help, but can you apply the patch since you can test it?

I am not sure, but it seems perhaps that we just need to make
the period_size, and m_PeriodSize, default to 1 perhaps if that
define isn't there.

Come up with what works for you, send in a CR like normal and I
will review it and then commit it for you as needed.

--greg.



More information about the Helix-client-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.