Changeset 4637:f50df7324ec1 in roaraudio


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

support non-symbolic backends

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4634 r4637  
    11v. 0.4beta2 - ? 
    22        * Announce standards via OpenSLP (Closes: #5) 
    3         * Updated VS API (Closes: #54, #3, #2) 
     3        * Updated VS API (Closes: #54, #3, #2, #99) 
    44        * Added support for CRC24 (RFC 4880) 
    55        * Added Base64 support. 
  • libroar/vs.c

    r4636 r4637  
    603603 struct roar_stream      out_stream; 
    604604 struct roar_stream_info out_info; 
    605  size_t offset; 
     605 size_t offset = 0; 
    606606 
    607607 _ckvss(-1); 
     
    624624   break; 
    625625  case ROAR_VS_BACKEND_FIRST: 
    626    // _roar_vs_find_first_prim(vss); 
    627626    if ( vss->first_primid == -1 ) { 
    628627     _seterr(ROAR_ERROR_UNKNOWN); 
     
    630629    } 
    631630 
    632     roar_stream_new_by_id(&out_stream, vss->first_primid); 
    633  
    634     if ( roar_stream_get_info(vss->con, &out_stream, &out_info) == -1 ) { 
    635      _seterrre(); 
     631    backend = vss->first_primid; 
     632   break; 
     633  default: 
     634    if ( backend < 0 ) { 
     635     _seterr(ROAR_ERROR_INVAL); 
    636636     return -1; 
    637637    } 
    638  
    639     offset  = out_info.delay * vss->info.rate; 
    640     offset /= 1000000; 
    641  
    642     return stream.pos + offset; 
    643    break; 
    644   default: 
    645     _seterr(ROAR_ERROR_NOTSUP); 
    646     return -1; 
    647    break; 
    648  } 
    649  
    650  _seterr(ROAR_ERROR_NOSYS); 
    651  return -1; 
     638   break; 
     639 } 
     640 
     641 
     642 if ( backend >= 0 ) { 
     643  roar_stream_new_by_id(&out_stream, backend); 
     644 
     645  if ( roar_stream_get_info(vss->con, &out_stream, &out_info) == -1 ) { 
     646   _seterrre(); 
     647   return -1; 
     648  } 
     649 
     650  offset  = out_info.delay * vss->info.rate; 
     651  offset /= 1000000; 
     652 } 
     653 
     654 return stream.pos + offset; 
    652655} 
    653656 
Note: See TracChangeset for help on using the changeset viewer.