Module: sems
Branch: master
Commit: 20abfdc1c02ffcd98267e205a44059a02e6af1c8
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=20abfdc1c02ffcd98267e205a44059a02e6af1c8

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Wed Apr 11 17:03:14 2012 +0200

b/f: fixes wrong timestamp computing in AmMultiPartyMixer

Thanks goes to Emil Kroymann!

---

 core/AmMultiPartyMixer.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/AmMultiPartyMixer.cpp b/core/AmMultiPartyMixer.cpp
index e4e75f4..ddeb12b 100644
--- a/core/AmMultiPartyMixer.cpp
+++ b/core/AmMultiPartyMixer.cpp
@@ -146,7 +146,7 @@ void AmMultiPartyMixer::PutChannelPacket(unsigned int   
channel_id,
 
     unsigned samples = PCM16_B2S(size);
     unsigned long long put_ts = system_ts + (MIXER_DELAY_MS * WALLCLOCK_RATE / 
1000);
-    unsigned long long user_put_ts = put_ts * (GetCurrentSampleRate()/100) / 
(SYSTEM_SAMPLECLOCK_RATE/100);
+    unsigned long long user_put_ts = put_ts * (GetCurrentSampleRate()/100) / 
(WALLCLOCK_RATE/100);
 
     channel->put(user_put_ts,(short*)buffer,samples);
     bstate->mixed_channel->get(user_put_ts,tmp_buffer,samples);
@@ -184,7 +184,7 @@ void AmMultiPartyMixer::GetChannelPacket(unsigned int   
channel_id,
     unsigned int samples = PCM16_B2S(size) * (bstate->sample_rate/100) / 
(GetCurrentSampleRate()/100);
     assert(samples <= PCM16_B2S(AUDIO_BUFFER_SIZE));
 
-    unsigned long long cur_ts = system_ts * (bstate->sample_rate/100) / 
(double) SYSTEM_SAMPLECLOCK_RATE;
+    unsigned long long cur_ts = system_ts * (bstate->sample_rate/100) / 
(WALLCLOCK_RATE/100);
     bstate->mixed_channel->get(cur_ts,tmp_buffer,samples);
     channel->get(cur_ts,(short*)buffer,samples);
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to