Changeset 5965


Ignore:
Timestamp:
Apr 10, 2019 6:32:27 AM (18 months ago)
Author:
nanang
Message:

Misc (re #2147): When tracing is enabled, print ALSA error message when opening device failed in device enumeration.

File:
1 edited

Legend:

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

    r5846 r5965  
    4848 
    4949/* Set to 1 to enable tracing */ 
    50 #if 0 
     50#define ENABLE_TRACING                  0 
     51 
     52#if ENABLE_TRACING 
    5153#       define TRACE_(expr)             PJ_LOG(5,expr) 
    5254#else 
     
    152154}; 
    153155 
     156#if ENABLE_TRACING==0 
    154157static void null_alsa_error_handler (const char *file, 
    155158                                int line, 
     
    165168    PJ_UNUSED_ARG(fmt); 
    166169} 
     170#endif 
    167171 
    168172static void alsa_error_handler (const char *file, 
     
    386390        return PJMEDIA_EAUD_SYSERR; 
    387391 
     392#if ENABLE_TRACING 
     393    snd_lib_error_set_handler(alsa_error_handler); 
     394#else 
    388395    /* Set a null error handler prior to enumeration to suppress errors */ 
    389396    snd_lib_error_set_handler(null_alsa_error_handler); 
     397#endif 
    390398 
    391399    n = hints; 
Note: See TracChangeset for help on using the changeset viewer.