Ignore:
Timestamp:
May 11, 2007 3:14:34 PM (18 years ago)
Author:
bennylp
Message:

HUGE changeset to make the rest of the libraries compile with C++ mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex_codec.c

    r974 r1266  
    482482        pj_list_erase(codec); 
    483483    } else { 
    484         codec = pj_pool_zalloc(spx_factory.pool,  
    485                                sizeof(pjmedia_codec)); 
     484        codec = PJ_POOL_ZALLOC_T(spx_factory.pool, pjmedia_codec); 
    486485        PJ_ASSERT_RETURN(codec != NULL, PJ_ENOMEM); 
    487486        codec->op = &spx_op; 
     
    737736 
    738737    /* Encode the frame */ 
    739     tx = speex_encode_int(spx->enc, input->buf, &spx->enc_bits); 
     738    tx = speex_encode_int(spx->enc, (spx_int16_t*)input->buf,  
     739                          &spx->enc_bits); 
    740740 
    741741    /* Check if we need not to transmit the frame (DTX) */ 
     
    754754    /* Copy the bits to an array of char that can be written */ 
    755755    output->size = speex_bits_write(&spx->enc_bits,  
    756                                     output->buf, output_buf_len); 
     756                                    (char*)output->buf, output_buf_len); 
    757757    output->type = PJMEDIA_FRAME_TYPE_AUDIO; 
    758758    output->timestamp = input->timestamp; 
     
    782782 
    783783    /* Copy the data into the bit-stream struct */ 
    784     speex_bits_read_from(&spx->dec_bits, input->buf, input->size); 
     784    speex_bits_read_from(&spx->dec_bits, (char*)input->buf, input->size); 
    785785 
    786786    /* Decode the data */ 
    787     speex_decode_int(spx->dec, &spx->dec_bits, output->buf); 
     787    speex_decode_int(spx->dec, &spx->dec_bits, (spx_int16_t*)output->buf); 
    788788 
    789789    output->type = PJMEDIA_FRAME_TYPE_AUDIO; 
    790790    output->size = speex_bits_nbytes(&spx->dec_bits); 
    791     pj_assert(output->size <= (int)output_buf_len); 
     791    pj_assert(output->size <= (unsigned)output_buf_len); 
    792792    output->timestamp.u64 = input->timestamp.u64; 
    793793 
     
    815815 
    816816    /* Recover packet loss */ 
    817     speex_decode_int(spx->dec, NULL, output->buf); 
     817    speex_decode_int(spx->dec, NULL, (spx_int16_t*) output->buf); 
    818818 
    819819    output->size = count * 2; 
Note: See TracChangeset for help on using the changeset viewer.