Changeset 2550


Ignore:
Timestamp:
Mar 23, 2009 1:32:39 PM (16 years ago)
Author:
nanang
Message:

Ticket #754: back-porting ticket #753

Location:
pjproject/branches/1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.0

  • pjproject/branches/1.0/pjmedia/src/pjmedia/clock_thread.c

    r2394 r2550  
    3636    pj_timestamp             next_tick; 
    3737    pj_timestamp             timestamp; 
    38     unsigned                 samples_per_frame; 
     38    unsigned                 timestamp_inc; 
    3939    unsigned                 options; 
    4040    pj_uint64_t              max_jump; 
     
    8282    clock->timestamp.u64 = 0; 
    8383    clock->max_jump = MAX_JUMP_MSEC * clock->freq.u64 / 1000; 
    84     clock->samples_per_frame = samples_per_frame; 
     84    clock->timestamp_inc = samples_per_frame / channel_count; 
    8585    clock->options = options; 
    8686    clock->cb = cb; 
     
    201201 
    202202    /* Increment timestamp */ 
    203     clock->timestamp.u64 += clock->samples_per_frame; 
     203    clock->timestamp.u64 += clock->timestamp_inc; 
    204204 
    205205    /* Calculate next tick */ 
     
    256256 
    257257        /* Increment timestamp */ 
    258         clock->timestamp.u64 += clock->samples_per_frame; 
     258        clock->timestamp.u64 += clock->timestamp_inc; 
    259259 
    260260        /* Calculate next tick */ 
Note: See TracChangeset for help on using the changeset viewer.