Changeset 4418:0234c5231754 in roaraudio


Ignore:
Timestamp:
10/06/10 00:04:33 (8 years ago)
Author:
phi
Branch:
default
Message:

make notify debug code runtime activatable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r4382 r4418  
    4545int add_output (char * drv, char * dev, char * opts, int prim, int count); 
    4646 
    47 #ifdef DEBUG 
    4847void dbg_notify_cb(struct roar_notify_core * core, struct roar_event * event, void * userdata) { 
    4948 char buf[1024] = ""; 
     
    7877 } else if ( ROAR_NOTIFY_IS_OE(ev) ) { 
    7978  switch (ev) { 
     79   // OE basics: 
    8080   case ROAR_OE_BASICS_CHANGE_STATE: 
    8181     snprintf(estr, sizeof(estr)-1, "/* ROAR_OE_BASICS_CHANGE_STATE */"); 
     
    9090     snprintf(estr, sizeof(estr)-1, "/* ROAR_OE_BASICS_DELETE */"); 
    9191    break; 
     92   // OE Streams: 
     93   case ROAR_OE_STREAM_CHANGE_VOLUME: 
     94     snprintf(estr, sizeof(estr)-1, "/* ROAR_OE_STREAM_CHANGE_VOLUME */"); 
     95    break; 
     96   case ROAR_OE_STREAM_XRUN: 
     97     snprintf(estr, sizeof(estr)-1, "/* ROAR_OE_STREAM_XRUN */"); 
     98    break; 
     99   // OE Default: 
    92100   default: 
    93101     snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_OE2EVENT(%i) */", ROAR_NOTIFY_EVENT2OE(ev)); 
     
    105113 } 
    106114 
    107  ROAR_DBG("dbg_notify_cb(core=%p, event=%p{.flags=0x%.8x, event=0x%.8x%s, %s.emitter=%i, .target=%i, .target_type=%i%s, .arg0=%i, .arg1=%i, .arg2=%p}, userdata=%p) = (void)", 
     115 ROAR_INFO("dbg_notify_cb(core=%p, event=%p{.flags=0x%.8x, event=0x%.8x%s, %s.emitter=%i, .target=%i, .target_type=%i%s, .arg0=%i, .arg1=%i, .arg2=%p}, userdata=%p) = (void)", 
     116           0 /* always print: minlevel = 0 */, 
    108117           core, event, 
    109118           (int)event->flags, 
     
    134143 roar_notify_core_subscribe(NULL, &event, dbg_notify_cb, NULL); 
    135144} 
    136 #endif 
    137145 
    138146#ifdef ROAR_HAVE_MAIN_ARGS 
     
    15251533 
    15261534#ifdef DEBUG 
     1535 // enable early in case we have DEBUG set. 
    15271536 dbg_notify_cb_register(); 
    15281537#endif 
     
    22172226#endif 
    22182227 
     2228#ifndef DEBUG 
     2229 // notify dbg if requested, if in DEBUG mode 
     2230 // do not able because it got enabled early. 
     2231 if ( g_verbose >= 4 ) 
     2232  dbg_notify_cb_register(); 
     2233#endif 
     2234 
    22192235#ifndef ROAR_WITHOUT_DCOMP_MIXER 
    22202236 if ( m_drv != NULL ) { 
Note: See TracChangeset for help on using the changeset viewer.