Changeset 5846 for pjproject


Ignore:
Timestamp:
Jul 27, 2018 2:58:41 AM (6 years ago)
Author:
ming
Message:

Re #2059 (misc): List ALSA audio device even if it fails to open

If an ALSA audio device cannot be opened for recording and playback, it may mean that they are temporarily busy (such as currently being used by another app), so we should still list it.

Thanks to Tobias Schneider for the patch.

File:
1 edited

Legend:

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

    r5678 r5846  
    244244    /* Check if the device could be opened in playback or capture mode */ 
    245245    if (pb_result<0 && ca_result<0) { 
    246         TRACE_((THIS_FILE, "Unable to open sound device %s", dev_name)); 
    247         return PJMEDIA_EAUD_NODEV; 
     246        TRACE_((THIS_FILE, "Unable to open sound device %s, setting " 
     247                           "in/out channel count to 0", dev_name)); 
     248        /* Set I/O channel counts to 0 to indicate unavailable device */ 
     249        adi->output_count = 0; 
     250        adi->input_count =  0; 
    248251    } 
    249252 
Note: See TracChangeset for help on using the changeset viewer.