Changeset 4581:f1a58ffe0be6 in roaraudio


Ignore:
Timestamp:
11/03/10 14:33:08 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed some minor bugs and flushing problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vs.c

    r4580 r4581  
    10311031  ret = roar_vio_read(vss->file, data, len); 
    10321032 
     1033  ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p): ret=%lli", vss, wait, error, (long long int)ret); 
     1034 
    10331035  if ( ret == -1 ) { 
     1036   ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p) = ?", vss, wait, error); 
     1037 
    10341038   roar_buffer_free(vss->writebuffer); 
    1035    vss->readbuffer = NULL; 
     1039   vss->writebuffer = NULL; 
    10361040   return -1; 
    10371041  } else if ( ret == 0 ) { 
     1042   ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p) = ?", vss, wait, error); 
     1043 
    10381044   is_eof = 1; 
    10391045   roar_buffer_free(vss->writebuffer); 
    1040    vss->readbuffer = NULL; 
     1046   vss->writebuffer = NULL; 
    10411047  } else { 
     1048   ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p) = ?", vss, wait, error); 
     1049 
    10421050   if ( len != ret ) { 
    10431051    len = ret; 
    1044     if ( roar_buffer_set_len(vss->readbuffer, len) == -1 ) 
     1052    if ( roar_buffer_set_len(vss->writebuffer, len) == -1 ) 
    10451053     return -1; 
    10461054   } 
     1055 
     1056   ROAR_DBG("roar_vs_iterate(vss=%p, wait=%i, error=%p) = ?", vss, wait, error); 
    10471057 
    10481058   ret = roar_vs_write(vss, data, len, error); 
     
    10701080 while ((ret = roar_vs_iterate(vss, ROAR_VS_WAIT, error)) > 0); 
    10711081 
     1082 ROAR_DBG("roar_vs_run(vss=%p, error=%p): ret=%i", vss, error, ret); 
     1083 
    10721084 if ( ret == 0 ) { 
    10731085  // flush buffers: 
     
    10751087 } 
    10761088 
     1089 if ( roar_vs_sync(vss, ROAR_VS_WAIT, error) == -1 ) 
     1090  return -1; 
     1091 
    10771092 return ret; 
    10781093} 
Note: See TracChangeset for help on using the changeset viewer.