Changeset 3441:a0284486d4b2 in roaraudio for libroarpulse/stream.c
- Timestamp:
- 02/13/10 15:28:10 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/stream.c
r3440 r3441 112 112 ROAR_DBG("pa_stream_new_with_proplist(c=%p, name='%s', ss=%p, map=%p, p=%p) = ?", c, name, ss, map, p); 113 113 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 120 114 s->fragments.num = 4; 121 115 s->fragments.size = 2048; … … 227 221 return -1; 228 222 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; 229 228 } 230 229 … … 455 454 /** Set the callback function that is called whenever the state of the stream changes */ 456 455 void 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 457 458 if ( s == NULL ) 458 459 return; … … 466 467 return; 467 468 469 ROAR_DBG("pa_stream_set_state(s=%p, st=%i): State: %i->%i", s, st, s->state, st); 470 468 471 s->state = st; 469 472 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); 471 475 s->cb.change_state.cb.ncb(s, s->cb.change_state.userdata); 472 476 } 477 ROAR_DBG("pa_stream_set_state(s=%p, st=%i) = (void)", s, st); 473 478 } 474 479
Note: See TracChangeset
for help on using the changeset viewer.