Update of /cvsroot/audacity/audacity-src/src/effects
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv20113/src/effects
Modified Files:
Noise.cpp
Log Message:
Minor speedup.
Index: Noise.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Noise.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Noise.cpp 12 Dec 2006 23:55:36 -0000 1.13
+++ Noise.cpp 13 Dec 2006 00:03:19 -0000 1.14
@@ -97,6 +97,7 @@
white=buf0=buf1=buf2=buf3=buf4=buf5=0;
// 0.55f is an experimental normalization factor: thanks to Martyn
+ amplitude *= 0.55f;
for(i=0; i<len; i++) {
white=(rand() / div) - 1.0f;
buf0=0.997f * buf0 + 0.029591f * white;
@@ -105,7 +106,7 @@
buf3=0.850f * buf3 + 0.090579f * white;
buf4=0.620f * buf4 + 0.108990f * white;
buf5=0.250f * buf5 + 0.255784f * white;
- buffer[i] = 0.55f * amplitude * (buf0 + buf1 + buf2 + buf3 + buf4 +
buf5);
+ buffer[i] = amplitude * (buf0 + buf1 + buf2 + buf3 + buf4 + buf5);
};
break;
@@ -118,10 +119,11 @@
a0=1.0f-b1;
// 6.2f is an experimental normalization factor: thanks to Martyn
+ amplitude *= 6.2f;
for(i=0; i<len; i++){
white=(rand() / div) - 1.0f;
y = (a0 * white + b1 * y);
- buffer[i] = 6.2f * amplitude * y;
+ buffer[i] = amplitude * y;
};
break;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs