Changeset 3428:44989588ad5a in roaraudio for libroarpulse


Ignore:
Timestamp:
02/11/10 23:51:57 (10 years ago)
Author:
phi
Branch:
default
Message:

use struct _roar_pa_stream_cb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/stream.c

    r3427 r3428  
    3838 
    3939#include <libroarpulse/libroarpulse.h> 
     40 
     41struct _roar_pa_stream_cb { 
     42 union { 
     43  pa_stream_notify_cb_t  ncb; 
     44  pa_stream_request_cb_t rcb; 
     45  pa_stream_success_cb_t scb; 
     46 } cb; 
     47 void * userdata; 
     48}; 
    4049 
    4150struct pa_stream { 
     
    4756 pa_sample_spec    sspec; 
    4857 struct { 
    49   pa_stream_notify_cb_t   change_state; 
    50   void                  * change_state_ud; 
     58  struct _roar_pa_stream_cb change_state; 
    5159 } cb; 
    5260}; 
     
    229237  return; 
    230238 
    231  s->cb.change_state    = cb; 
    232  s->cb.change_state_ud = userdata; 
     239 s->cb.change_state.cb.ncb    = cb; 
     240 s->cb.change_state.userdata = userdata; 
    233241} 
    234242 
     
    239247 s->state = st; 
    240248 
    241  if ( s->cb.change_state == NULL ) { 
    242   s->cb.change_state(s, s->cb.change_state_ud); 
     249 if ( s->cb.change_state.cb.ncb == NULL ) { 
     250  s->cb.change_state.cb.ncb(s, s->cb.change_state.userdata); 
    243251 } 
    244252} 
Note: See TracChangeset for help on using the changeset viewer.