Changeset 4579:d6f55bf4b6d4 in roaraudio


Ignore:
Timestamp:
11/03/10 04:01:03 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support for ROAR_VS_WAIT (Closes: #54)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4577 r4579  
    11v. 0.4beta2 - ? 
    22        * Announce standards via OpenSLP (Closes: #5) 
     3        * Updated VS API (Closes: #54) 
    34 
    45v. 0.4beta1 - Mon Nov 01 2010 16:14 CET 
  • libroar/vs.c

    r4260 r4579  
    281281 
    282282int     roar_vs_sync (roar_vs_t * vss, int wait, int * error) { 
    283  _ckvss(-1); 
    284  
    285  if ( !(vss->flags & FLAG_STREAM) ) { 
    286   _seterr(ROAR_ERROR_INVAL); 
    287   return -1; 
    288  } 
    289  
    290  if ( wait != ROAR_VS_NOWAIT ) { 
     283 struct roar_event waits, triggered; 
     284 
     285 _ckvss(-1); 
     286 
     287 if ( !(vss->flags & FLAG_STREAM) ) { 
     288  _seterr(ROAR_ERROR_INVAL); 
     289  return -1; 
     290 } 
     291 
     292 if ( wait != ROAR_VS_NOWAIT && wait != ROAR_VS_WAIT ) { 
    291293  _seterr(ROAR_ERROR_INVAL); 
    292294  return -1; 
     
    298300  _seterrre(); 
    299301  return -1; 
     302 } 
     303 
     304 if ( wait == ROAR_VS_WAIT ) { 
     305  memset(&waits, 0, sizeof(waits)); 
     306  waits.event       = ROAR_OE_STREAM_XRUN; 
     307  waits.emitter     = -1; 
     308  waits.target      = roar_stream_get_id(&(vss->stream)); 
     309  waits.target_type = ROAR_OT_STREAM; 
     310 
     311  if ( roar_wait(vss->con, &triggered, &waits, 1) == -1 ) { 
     312   _seterrre(); 
     313   return -1; 
     314  } 
    300315 } 
    301316 
Note: See TracChangeset for help on using the changeset viewer.