Changeset 1266 for pjproject/trunk/pjmedia/src/pjmedia/resample_port.c
- Timestamp:
- May 11, 2007 3:14:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/resample_port.c
r1171 r1266 70 70 71 71 /* Create and initialize port. */ 72 rport = pj_pool_zalloc(pool, sizeof(struct resample_port));72 rport = PJ_POOL_ZALLOC_T(pool, struct resample_port); 73 73 PJ_ASSERT_RETURN(rport != NULL, PJ_ENOMEM); 74 74 … … 85 85 * both functions may run simultaneously. 86 86 */ 87 rport->get_buf = pj_pool_alloc(pool, dn_port->info.bytes_per_frame); 87 rport->get_buf = (pj_int16_t*) 88 pj_pool_alloc(pool, dn_port->info.bytes_per_frame); 88 89 PJ_ASSERT_RETURN(rport->get_buf != NULL, PJ_ENOMEM); 89 90 90 rport->put_buf = pj_pool_alloc(pool, dn_port->info.bytes_per_frame); 91 rport->put_buf = (pj_int16_t*) 92 pj_pool_alloc(pool, dn_port->info.bytes_per_frame); 91 93 PJ_ASSERT_RETURN(rport->put_buf != NULL, PJ_ENOMEM); 92 94 … … 140 142 141 143 if (frame->type == PJMEDIA_FRAME_TYPE_AUDIO) { 142 pjmedia_resample_run( rport->resample_put, frame->buf, 144 pjmedia_resample_run( rport->resample_put, 145 (const pj_int16_t*) frame->buf, 143 146 rport->put_buf); 144 147 … … 189 192 } 190 193 191 pjmedia_resample_run( rport->resample_get, tmp_frame.buf, frame->buf); 194 pjmedia_resample_run( rport->resample_get, 195 (const pj_int16_t*) tmp_frame.buf, 196 (pj_int16_t*) frame->buf); 192 197 193 198 frame->size = rport->base.info.bytes_per_frame;
Note: See TracChangeset
for help on using the changeset viewer.