Changeset 2685


Ignore:
Timestamp:
May 7, 2009 4:51:17 PM (16 years ago)
Author:
nanang
Message:

Ticket #820: Fixed sound port to return zero-filled audio frame when there is 'problem' getting frame from remote port ('no_frame' label), this seems to fix stutter noise issue on Mac.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/sound_port.c

    r2506 r2685  
    6767    pjmedia_snd_port *snd_port = (pjmedia_snd_port*) user_data; 
    6868    pjmedia_port *port; 
    69     unsigned required_size = frame->size; 
     69    const unsigned required_size = frame->size; 
    7070    pj_status_t status; 
    7171 
     
    8282 
    8383    /* Must supply the required samples */ 
    84     PJ_UNUSED_ARG(required_size); 
    8584    pj_assert(frame->size == required_size); 
    8685 
     
    9998 
    10099no_frame: 
     100    frame->type = PJMEDIA_FRAME_TYPE_AUDIO; 
     101    frame->size = required_size; 
     102    pj_bzero(frame->buf, frame->size); 
    101103 
    102104    if (snd_port->ec_state && !snd_port->ec_suspended) { 
Note: See TracChangeset for help on using the changeset viewer.