changeset 2350:233996ff7603

output value slightly limited
author Eugene Zagidullin <e.asphyx@gmail.com>
date Thu, 31 Jan 2008 13:10:55 +0300
parents a916f7215b62
children db02ad480056
files src/tonegen/tonegen.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tonegen/tonegen.c	Thu Jan 31 12:43:55 2008 +0300
+++ b/src/tonegen/tonegen.c	Thu Jan 31 13:10:55 2008 +0300
@@ -111,7 +111,7 @@
 					tone[j].t -= tone[j].period;
 				tone[j].t++;
 			}
-			data[i] = (sum_sines / (double)frequencies->len);
+			data[i] = (sum_sines * 0.999 / (double)frequencies->len); /* dithering can cause a little bit of clipping */
 		}
 		playback->pass_audio(playback, FMT_FLOAT, 1, BUF_BYTES, data, &going);
 	}