Changeset 4151


Ignore:
Timestamp:
Jun 1, 2012 4:49:57 AM (12 years ago)
Author:
ming
Message:

Re #1521: minor fixes to BB10 dev.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/bb10_dev.c

    r4150 r4151  
    2020/* 
    2121 * This is the implementation of BlackBerry 10 (BB10) audio device. 
    22  * Original code was kindly donated by Truphone Ltd. 
     22 * Original code was kindly donated by Truphone Ltd. (http://www.truphone.com) 
    2323 * The key methods here are bb10_capture_open, bb10_play_open together 
    2424 * with the capture and play threads ca_thread_func and pb_thread_func 
     
    568568    snd_pcm_channel_setup_t setup; 
    569569    snd_mixer_group_t group; 
     570    snd_pcm_channel_params_t pp; 
    570571    unsigned int rate; 
    571572    unsigned long tmp_buf_size; 
     
    590591    } 
    591592 
    592     snd_pcm_channel_params_t pp; 
    593593    memset (&pp, 0, sizeof (pp)); 
    594594 
     
    607607    pp.format.interleave = 1; 
    608608    /* HARD CODE for the time being PJMEDIA expects 16khz */ 
    609     PJ_TODO(REMOVE_SAMPLE_RATE_HARD_CODE);     
     609    PJ_TODO(REMOVE_SAMPLE_RATE_HARD_CODE); 
     610    pj_assert(param->clock_rate == VOIP_SAMPLE_RATE * 2); 
    610611    pp.format.rate = VOIP_SAMPLE_RATE*2; 
    611612    pp.format.voices = 1; 
     
    713714    /* HARD CODE for the time being PJMEDIA expects 16khz */ 
    714715    PJ_TODO(REMOVE_SAMPLE_RATE_HARD_CODE); 
     716    pj_assert(param->clock_rate == VOIP_SAMPLE_RATE * 2); 
    715717    pp.format.rate = VOIP_SAMPLE_RATE*2; 
    716718    pp.format.voices = 1; 
     
    956958    bb10_stream_stop (s); 
    957959 
    958     if (stream->param.dir & PJMEDIA_DIR_PLAYBACK) { 
    959         /* 
    960         snd_mixer_close (stream->pb_mixer); 
    961         snd_pcm_close (stream->pb_pcm); 
    962         stream->pb_mixer = NULL; 
    963         stream->pb_pcm = NULL; 
    964         */ 
    965     } 
    966     if (stream->param.dir & PJMEDIA_DIR_CAPTURE) { 
    967         /* 
    968         snd_mixer_close (stream->ca_mixer); 
    969         snd_pcm_close (stream->ca_pcm); 
    970         stream->ca_mixer = NULL; 
    971         stream->ca_pcm = NULL; 
    972         */ 
    973     } 
    974  
    975960    pj_pool_release (stream->pool); 
    976961 
Note: See TracChangeset for help on using the changeset viewer.