From 0ca09430215e929052d0f7bf1e48a296cfe47b06 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
Date: Tue, 14 Sep 2010 11:46:34 -0400
Subject: [PATCH] [#3946] Make fadin faster

---
 sflphone-common/src/audio/audiortp/AudioRtpSession.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.h b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
index b961646652..61b2d6be81 100644
--- a/sflphone-common/src/audio/audiortp/AudioRtpSession.h
+++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.h
@@ -59,6 +59,9 @@
 // Frequency (in packet number)
 #define RTP_TIMESTAMP_RESET_FREQ 100
 
+// Factor use to increase volume in fade in
+#define FADEIN_STEP_SIZE 4;
+
 namespace sfl
 {
 
@@ -853,8 +856,10 @@ bool AudioRtpSession<D>::fadeIn (SFLDataFormat *audio, int size, SFLDataFormat *
         audio[size] /= *factor;
     }
 
-    *factor /= 2;
+    // decrease factor
+    *factor /= FADEIN_STEP_SIZE;
 
+    // if factor reach 0, thsi function should no be called anymore
     if (*factor == 0)
         return true;
 
-- 
GitLab