Changeset 3709


Ignore:
Timestamp:
Aug 18, 2011 4:57:42 AM (13 years ago)
Author:
nanang
Message:

Fix #1345: Fixed samples-per-frame calculation formula bug in PJMEDIA_SPF().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/format.h

    r3664 r3709  
    442442#if PJ_HAS_INT64 
    443443    return ((unsigned)((pj_uint64_t)usec_ptime * \ 
    444                        clock_rate / channel_count / 1000000)); 
     444                       clock_rate * channel_count / 1000000)); 
    445445#elif PJ_HAS_FLOATING_POINT 
    446     return ((unsigned)(1.0*usec_ptime * clock_rate / channel_count / 1000000)); 
     446    return ((unsigned)(1.0*usec_ptime * clock_rate * channel_count / 1000000)); 
    447447#else 
    448     return ((unsigned)(usec_ptime / 1000L * clock_rate / \ 
     448    return ((unsigned)(usec_ptime / 1000L * clock_rate * \ 
    449449                       channel_count / 1000)); 
    450450#endif 
Note: See TracChangeset for help on using the changeset viewer.