Ignore:
Timestamp:
May 6, 2009 3:44:12 PM (12 years ago)
Author:
nanang
Message:

Ticket #819:

  • Updated APS to supports for sampling rate 16kHz and stereo (using resample).
  • Fixed buffer len calculations in Symbian MDA.
  • Disabled multichannel support on Symbian MDA (since its input device doesn't support for stereo?).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp

    r2668 r2677  
    271271      lastError_(KErrNone), timeStamp_(0), 
    272272      frameLen_(parent_strm->param.samples_per_frame *  
    273                 parent_strm->param.channel_count *  
    274273                BYTES_PER_SAMPLE), 
    275274      frameRecBuf_(NULL), frameRecBufLen_(0) 
     
    426425    } 
    427426 
    428     if (frameRecBufLen_ || aBuffer.Size() < frameLen_) { 
    429         pj_memcpy(frameRecBuf_ + frameRecBufLen_, (void*) aBuffer.Ptr(), aBuffer.Size()); 
    430         frameRecBufLen_ += aBuffer.Size(); 
     427    if (frameRecBufLen_ || aBuffer.Length() < frameLen_) { 
     428        pj_memcpy(frameRecBuf_ + frameRecBufLen_, (void*) aBuffer.Ptr(), aBuffer.Length()); 
     429        frameRecBufLen_ += aBuffer.Length(); 
    431430    } 
    432431 
     
    454453        f.type = PJMEDIA_FRAME_TYPE_AUDIO; 
    455454        f.buf = (void*)aBuffer.Ptr(); 
    456         f.size = aBuffer.Size(); 
     455        f.size = aBuffer.Length(); 
    457456        f.timestamp.u32.lo = timeStamp_; 
    458457        f.bit_info = 0; 
     
    572571{ 
    573572    frameBufSize_ = parentStrm_->param.samples_per_frame * 
    574                     parentStrm_->param.channel_count *  
    575573                    BYTES_PER_SAMPLE; 
    576574    frameBuf_ = new TUint8[frameBufSize_]; 
     
    898896                     param->ext_fmt.id == PJMEDIA_FORMAT_L16, 
    899897                     PJ_ENOTSUP); 
     898     
     899    /* It seems that MDA recorder only supports for mono channel. */ 
     900    PJ_ASSERT_RETURN(param->channel_count == 1, PJ_EINVAL); 
    900901 
    901902    /* Create and Initialize stream descriptor */ 
Note: See TracChangeset for help on using the changeset viewer.