Changeset 3441:a0284486d4b2 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/13/10 15:28:10 (10 years ago)
Author:
phi
Branch:
default
Message:

move calcing of roar_pa_sspec2auinfo() from new to connect, added some debug lions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/stream.c

    r3440 r3441  
    112112 ROAR_DBG("pa_stream_new_with_proplist(c=%p, name='%s', ss=%p, map=%p, p=%p) = ?", c, name, ss, map, p); 
    113113 
    114  if ( roar_pa_sspec2auinfo(&(s->stream.info), ss) == -1 ) { 
    115   roar_mm_free(s); 
    116   ROAR_DBG("pa_stream_new_with_proplist(c=%p, name='%s', ss=%p, map=%p, p=%p) = NULL // invalid format", c, name, ss, map, p); 
    117   return NULL; 
    118  } 
    119  
    120114 s->fragments.num  = 4; 
    121115 s->fragments.size = 2048; 
     
    227221    return -1; 
    228222   break; 
     223 } 
     224 
     225 if ( roar_pa_sspec2auinfo(&(s->stream.info), &(s->sspec)) == -1 ) { 
     226  pa_stream_set_state(s, PA_STREAM_FAILED); 
     227  return -1; 
    229228 } 
    230229 
     
    455454/** Set the callback function that is called whenever the state of the stream changes */ 
    456455void pa_stream_set_state_callback(pa_stream *s, pa_stream_notify_cb_t cb, void *userdata) { 
     456 ROAR_DBG("pa_stream_set_state_callback(s=%p, cb=%p, userdata=%p) = ?", s, cb, userdata); 
     457 
    457458 if ( s == NULL ) 
    458459  return; 
     
    466467  return; 
    467468 
     469 ROAR_DBG("pa_stream_set_state(s=%p, st=%i): State: %i->%i", s, st, s->state, st); 
     470 
    468471 s->state = st; 
    469472 
    470  if ( s->cb.change_state.cb.ncb == NULL ) { 
     473 if ( s->cb.change_state.cb.ncb != NULL ) { 
     474  ROAR_DBG("pa_stream_set_state(s=%p, st=%i): calling callback at %p", s, st, s->cb.change_state.cb.ncb); 
    471475  s->cb.change_state.cb.ncb(s, s->cb.change_state.userdata); 
    472476 } 
     477 ROAR_DBG("pa_stream_set_state(s=%p, st=%i) = (void)", s, st); 
    473478} 
    474479 
Note: See TracChangeset for help on using the changeset viewer.