Hi,

timestamp handling in AmMultiPartyMixer in this commit is not quite
correct. The attached patch fixes this.

Cheers,

Emil

Am Mon, 12 Mar 2012 22:39:00 +0100 (CET)
schrieb Raphael Coeffic <[email protected]>:

> Module: sems
> Branch: master
> Commit: 2fbb664e2dfeb4492fae0ffac38cae4b8cc58a1e
> URL:
> http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=2fbb664e2dfeb4492fae0ffac38cae4b8cc58a1e
> 
> Author: Raphael Coeffic <[email protected]>
> Committer: Raphael Coeffic <[email protected]>
> Date:   Fri Mar  9 14:02:12 2012 +0100
> 
> wideband: several fixes related to timestamp overflows at different
> sample rates.
> 
> ---
> 
>  Makefile.defs                |    2 +-
>  core/AmAdvancedAudio.cpp     |  117 ++++++++++++++++++-----------
>  core/AmAdvancedAudio.h       |   82 ++++++++++++++-------
>  core/AmAudio.cpp             |  149
> ++++++++++--------------------------- core/AmAudio.h               |
> 105 +++++++++++--------------- core/AmAudioFile.cpp         |   27
> ++++--- core/AmAudioMixIn.cpp        |   24 ++++---
>  core/AmAudioMixIn.h          |    9 ++-
>  core/AmAudioMixer.cpp        |   22 ++++--
>  core/AmAudioMixer.h          |    6 +-
>  core/AmB2ABSession.cpp       |   27 -------
>  core/AmB2ABSession.h         |   28 ++-----
>  core/AmBufferedAudio.cpp     |   17 +++--
>  core/AmBufferedAudio.h       |    3 +-
>  core/AmCachedAudioFile.cpp   |    4 +-
>  core/AmConferenceChannel.cpp |   27 ++++---
>  core/AmConferenceChannel.h   |    6 +-
>  core/AmMediaProcessor.cpp    |   37 ++++++---
>  core/AmMediaProcessor.h      |    2 +-
>  core/AmMultiPartyMixer.cpp   |   33 +++++----
>  core/AmMultiPartyMixer.h     |   12 +--
>  core/AmPlaylist.cpp          |   16 +++-
>  core/AmPlaylist.h            |    9 ++-
>  core/AmPrecodedFile.cpp      |   31 +++-----
>  core/AmPrecodedFile.h        |   17 +++--
>  core/AmRtpAudio.cpp          |  166
> +++++++++++++++++++++++++++++++++--------
> core/AmRtpAudio.h            |   57 ++++++++++++---
> core/SampleArray.cc          |    7 ++- core/SampleArray.h
> |   11 +++- 29 files changed, 594 insertions(+), 459 deletions(-)
> 
> Diff:
> http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commitdiff;h=2fbb664e2dfeb4492fae0ffac38cae4b8cc58a1e
> _______________________________________________ Semsdev mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/semsdev
> 



-- 
Emil Kroymann
VoIP Services Engineer

Email: [email protected]
Tel: +49-30-203899885
Mobile: +49-176-38389303

ISACO GmbH
Kurfürstenstraße 79
10787 Berlin
Germany

Amtsgericht Charlottenburg, HRB 112464B
Geschäftsführer: Daniel Frommherz

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);
 

Attachment: signature.asc
Description: PGP signature

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

Reply via email to