Changeset 2515 for pjproject/trunk


Ignore:
Timestamp:
Mar 16, 2009 6:57:06 PM (15 years ago)
Author:
nanang
Message:

Ticket #753: Fixed timestamp increment in clock thread to consider the channel count, also renamed the field name from samples_per_frame to timestamp_inc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/clock_thread.c

    r2394 r2515  
    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.