Changeset 3085 for pjproject/trunk/pjmedia/src/pjmedia/resample_resample.c
- Timestamp:
- Feb 1, 2010 11:23:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/resample_resample.c
r2394 r3085 124 124 /* Allocate temporary output buffer */ 125 125 size = (unsigned) (resample->frame_size * sizeof(pj_int16_t) * 126 resample->factor / channel_count );126 resample->factor / channel_count + 0.5); 127 127 resample->tmp_buffer = (pj_int16_t*) pj_pool_alloc(pool, size); 128 128 PJ_ASSERT_RETURN(resample->tmp_buffer, PJ_ENOMEM); … … 246 246 247 247 mono_frm_sz_in = resample->frame_size / resample->channel_cnt; 248 mono_frm_sz_out = (unsigned)(mono_frm_sz_in * resample->factor );248 mono_frm_sz_out = (unsigned)(mono_frm_sz_in * resample->factor + 0.5); 249 249 250 250 /* Deinterleave input */
Note: See TracChangeset
for help on using the changeset viewer.