Revision: 39053 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39053 Author: nexyon Date: 2011-08-05 07:01:54 +0000 (Fri, 05 Aug 2011) Log Message: ----------- 3D Audio GSoC: JOS Resampler: Fix for windows...
Modified Paths: -------------- branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.cpp Modified: branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.cpp =================================================================== --- branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.cpp 2011-08-05 06:59:36 UTC (rev 39052) +++ branches/soc-2011-pepper/intern/audaspace/intern/AUD_JOSResampleReader.cpp 2011-08-05 07:01:54 UTC (rev 39053) @@ -190,7 +190,7 @@ memset(buffer, 0, length * samplesize); unsigned int n_increment = (unsigned int)(floor(1 / factor)); - unsigned int P_increment = (unsigned int)(round(4294967296.0 * fmod(1 / factor, 1))); + unsigned int P_increment = (unsigned int)(floor(4294967296.0 * fmod(1 / factor, 1))); unsigned int P, L, l, end_i; float eta, v; @@ -208,7 +208,7 @@ end_i = m_n + 1; l = (unsigned int)(floor(float(P) / float(m_NN))); - eta = fmod(P, m_NN) / m_NN; + eta = float(P % m_NN) / m_NN; for(unsigned int i = 0; i < end_i; i++) { @@ -222,7 +222,7 @@ P = ~P; l = (unsigned int)(floor(float(P) / float(m_NN))); - eta = fmod(P, m_NN) / m_NN; + eta = float(P % m_NN) / m_NN; end_i = m_cache_valid - m_n - 1; if(m_Nz - 1 < end_i) @@ -251,14 +251,14 @@ for(unsigned int t = 0; t < length; t++) { - P = (unsigned int)(round(m_P * factor)); + P = (unsigned int)(floor(m_P * factor)); end_i = (unsigned int)(floor(m_Nz / factor)) - 1; if(m_n + 1 < end_i) end_i = m_n + 1; l = (unsigned int)(floor(float(P) / float(m_NN))); - eta = fmod(P, m_NN) / m_NN; + eta = float(P % m_NN) / m_NN; for(unsigned int i = 0; i < end_i; i++) { @@ -272,7 +272,7 @@ P = (factor * 4294967296.0) - P; l = (unsigned int)(floor(float(P) / float(m_NN))); - eta = fmod(P, m_NN) / m_NN; + eta = float(P % m_NN) / m_NN; end_i = (unsigned int)(floor(m_Nz / factor)) - 1; if(m_cache_valid - m_n - 1 < end_i) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs