Changeset 481


Ignore:
Timestamp:
May 28, 2006 2:55:22 PM (17 years ago)
Author:
bennylp
Message:

Sound device id zero mean autoselect device

Location:
pjproject/trunk/pjmedia/src/pjmedia
Files:
2 edited

Legend:

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

    r459 r481  
    193193static pj_status_t get_frame(pjmedia_port *this_port,  
    194194                             pjmedia_frame *frame); 
     195static pj_status_t destroy_port(pjmedia_port *this_port); 
    195196 
    196197 
     
    455456    conf->master_port->get_frame = &get_frame; 
    456457    conf->master_port->put_frame = &put_frame; 
     458    conf->master_port->on_destroy = &destroy_port; 
    457459 
    458460    conf->master_port->user_data = conf; 
     
    532534 
    533535    return PJ_SUCCESS; 
     536} 
     537 
     538 
     539/* 
     540 * Destroy the master port (will destroy the conference) 
     541 */ 
     542static pj_status_t destroy_port(pjmedia_port *this_port) 
     543{ 
     544    pjmedia_conf *conf = this_port->user_data; 
     545    return pjmedia_conf_destroy(conf); 
    534546} 
    535547 
  • pjproject/trunk/pjmedia/src/pjmedia/pasound.c

    r371 r481  
    244244    PaError err; 
    245245 
    246     if (index == -1) { 
     246    if (index <= 0) { 
    247247        int count = Pa_GetDeviceCount(); 
    248248        for (index=0; index<count; ++index) { 
     
    337337    PaError err; 
    338338 
    339     if (index == -1) { 
     339    if (index <= 0) { 
    340340        int count = Pa_GetDeviceCount(); 
    341341        for (index=0; index<count; ++index) { 
     
    439439    PaError err; 
    440440 
    441     if (rec_id == -1) { 
     441    if (rec_id <= 0) { 
    442442        int count = Pa_GetDeviceCount(); 
    443443        for (rec_id=0; rec_id<count; ++rec_id) { 
     
    458458    } 
    459459 
    460     if (play_id == -1) { 
     460    if (play_id <= 0) { 
    461461        int count = Pa_GetDeviceCount(); 
    462462        for (play_id=0; play_id<count; ++play_id) { 
Note: See TracChangeset for help on using the changeset viewer.