Ignore:
Timestamp:
Mar 24, 2006 8:41:20 PM (18 years ago)
Author:
bennylp
Message:

Added WAVE writer and resample port, and also found out why audio quality is poor with DirectSound?

File:
1 edited

Legend:

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

    r335 r358  
    3636    PJ_ASSERT_RETURN(pool && upstream_port && downstream_port, PJ_EINVAL); 
    3737 
     38#if 0 
    3839    /* They both MUST have the same media type. */ 
    3940    PJ_ASSERT_RETURN(upstream_port->info.type == 
     
    5859                     downstream_port->info.bytes_per_frame,  
    5960                     PJMEDIA_ENCBYTES); 
     61#endif 
    6062 
    6163    /* Create mutual attachment. */ 
    62     status = upstream_port->on_downstream_connect( pool, upstream_port, 
    63                                                    downstream_port ); 
    64     if (status != PJ_SUCCESS) 
    65         return status; 
     64    if (upstream_port->on_downstream_connect) { 
     65        status = upstream_port->on_downstream_connect( pool, upstream_port, 
     66                                                       downstream_port ); 
     67        if (status != PJ_SUCCESS) 
     68            return status; 
     69    } 
    6670 
    67     status = downstream_port->on_upstream_connect( pool, downstream_port, 
    68                                                    upstream_port ); 
    69     if (status != PJ_SUCCESS) 
    70         return status; 
     71    if (downstream_port->on_upstream_connect) { 
     72        status = downstream_port->on_upstream_connect( pool, downstream_port, 
     73                                                       upstream_port ); 
     74        if (status != PJ_SUCCESS) 
     75            return status; 
     76    } 
    7177 
    7278    /* Save the attachment. */ 
Note: See TracChangeset for help on using the changeset viewer.