Ignore:
Timestamp:
Mar 16, 2006 7:03:07 PM (18 years ago)
Author:
bennylp
Message:

Support for stereo audio (or N audio channels, for that matter)

File:
1 edited

Legend:

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

    r321 r322  
    137137    struct conf_port    **ports;        /**< Array of ports.                */ 
    138138    pj_uint16_t          *uns_buf;      /**< Buf for unsigned conversion    */ 
    139     unsigned              clock_rate;   /**< Sampling rate.         */ 
     139    unsigned              clock_rate;   /**< Sampling rate.                 */ 
     140    unsigned              channel_count;/**< Number of channels (1=mono).   */ 
    140141    unsigned              samples_per_frame;    /**< Samples per frame.     */ 
    141142    unsigned              bits_per_sample;      /**< Bits per sample.       */ 
     
    323324                                         unsigned max_ports, 
    324325                                         unsigned clock_rate, 
     326                                         unsigned channel_count, 
    325327                                         unsigned samples_per_frame, 
    326328                                         unsigned bits_per_sample, 
     
    493495 
    494496    PJ_ASSERT_RETURN(conf && pool && strm_port && port_name, PJ_EINVAL); 
     497 
     498    /* For this version of PJMEDIA, port MUST have the same number of 
     499     * PCM channels. 
     500     */ 
     501    if (strm_port->info.channel_count != conf->channel_count) { 
     502        pj_assert(!"Number of channels mismatch"); 
     503        return PJMEDIA_ENCCHANNEL; 
     504    } 
    495505 
    496506    pj_mutex_lock(conf->mutex); 
Note: See TracChangeset for help on using the changeset viewer.