Changeset 5069:d7bf200c3aae in roaraudio


Ignore:
Timestamp:
06/19/11 13:08:52 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

seperate last pos and offset for later ASYNC latency updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vs.c

    r5068 r5069  
    8282 struct { 
    8383  ssize_t last_pos; 
     84  ssize_t last_offset; 
    8485  struct roar_time last_time; 
    8586 } latmes; 
     
    669670  vss->latmes.last_pos = -1; 
    670671 } else { 
    671   vss->latmes.last_pos = stream.pos + offset; 
     672  vss->latmes.last_pos    = stream.pos; 
     673  vss->latmes.last_offset = offset; 
    672674 } 
    673675 
     
    809811  //printf("pos=%zi, lpos=%zi, bps=%zi, diff[lpos-pos]=%zi\n", pos, lpos, bps, (lpos - pos)); 
    810812 
    811   lag = (signed long long int)lpos - (signed long long int)vss->latmes.last_pos; 
     813  lag = (signed long long int)lpos - (signed long long int)(vss->latmes.last_pos + vss->latmes.last_offset); 
    812814  lag /= vss->info.channels; 
    813815 
Note: See TracChangeset for help on using the changeset viewer.