RE: Error causes floating point exception in CAudioOutLinuxAlsa::_SetDeviceConfig()
"Nguyen, Khanh V" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <AD75107ECAEC4949991FB357E775D5C5334236FA@orsmsx502.amr.corp.intel.com> |
Greg, I have write access now. I will test it and will go thru the patching process. Thanks, --Khanh -----Original Message----- From: Greg Wright [mailto:[email protected]] Sent: Tuesday, April 28, 2009 8:11 AM To: Nguyen, Khanh V Cc: [email protected] Subject: Re: [Helix-client-dev] Error causes floating point exception in CAudioOutLinuxAlsa::_SetDeviceConfig() 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.