Skip to content
Snippets Groups Projects
Commit 0ca09430 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3946] Make fadin faster

parent 09d4d466
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
// Frequency (in packet number) // Frequency (in packet number)
#define RTP_TIMESTAMP_RESET_FREQ 100 #define RTP_TIMESTAMP_RESET_FREQ 100
// Factor use to increase volume in fade in
#define FADEIN_STEP_SIZE 4;
namespace sfl namespace sfl
{ {
...@@ -853,8 +856,10 @@ bool AudioRtpSession<D>::fadeIn (SFLDataFormat *audio, int size, SFLDataFormat * ...@@ -853,8 +856,10 @@ bool AudioRtpSession<D>::fadeIn (SFLDataFormat *audio, int size, SFLDataFormat *
audio[size] /= *factor; 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) if (*factor == 0)
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment