Changeset 3427:bb188ddb4b1d in roaraudio for libroarpulse


Ignore:
Timestamp:
02/11/10 23:26:35 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support pa_stream_get_sample_spec()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/stream.c

    r3426 r3427  
    4545 struct roar_stream stream; 
    4646 pa_stream_state_t state; 
     47 pa_sample_spec    sspec; 
    4748 struct { 
    4849  pa_stream_notify_cb_t   change_state; 
     
    8586 
    8687 memset(s, 0, sizeof(pa_stream)); 
     88 
     89 memcpy(&(s->sspec), ss, sizeof(pa_sample_spec)); 
    8790 
    8891 if ( roar_pa_sspec2auinfo(&(s->stream.info), ss) == -1 ) { 
     
    313316 
    314317/** Return a pointer to the stream's sample specification. \since 0.6 */ 
    315 const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s); 
     318const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s) { 
     319 if ( s == NULL ) 
     320  return NULL; 
     321 
     322 return &(s->sspec); 
     323} 
    316324 
    317325/** Return a pointer to the stream's channel map. \since 0.8 */ 
Note: See TracChangeset for help on using the changeset viewer.