Changeset 4213:1ecc289996e2 in roaraudio
- Timestamp:
- 08/20/10 02:53:09 (14 years ago)
- Branch:
- default
- Phase:
- public
- Tags:
- roaraudio_0_3_pr1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/vs.h
r4212 r4213 120 120 int roar_vs_blocking (roar_vs_t * vss, int val, int * error); 121 121 122 /* TODO: document this*/122 /* default backend */ 123 123 #define ROAR_VS_BACKEND_DEFAULT ROAR_VS_BACKEND_FIRST 124 /* do not supply backend offset */ 124 125 #define ROAR_VS_BACKEND_NONE -1 126 /* use first found primay stream of same mixer as offset source */ 125 127 #define ROAR_VS_BACKEND_FIRST -2 128 /* use mean of primary streams of same mixer as offset source */ 126 129 #define ROAR_VS_BACKEND_MEAN -3 127 130 131 /* get server's possition of stream 132 * returns server's possition of the stream or -1 on error. 133 * The retruned server possition is the possition in samples 134 * plus a offset provided by the selected backend 135 */ 128 136 ssize_t roar_vs_position(roar_vs_t * vss, int backend, int * error); 129 137 138 /* get latency between playback and local write counter 139 * This function may fail because the used codec uses 140 * non-fixed bitrate. 141 * if this function fails it retruns zero and sets error or 142 * clear error to ROAR_ERROR_NONE. 143 * If non-zero is retruned error is untouched. 144 * return value is in mu-sec (units of 10^-6s). 145 * Note that the retruned value may be negative (the server being 146 * ahead of us). This is normal in case we read a stream. 147 */ 130 148 roar_mus_t roar_vs_latency(roar_vs_t * vss, int backend, int * error); 131 149 -
libroar/vs.c
r4212 r4213 437 437 if ( !(vss->flags & FLAG_STREAM) ) { 438 438 _seterr(ROAR_ERROR_INVAL); 439 return -1;439 return 0; 440 440 } 441 441 … … 452 452 if ( bps == -1 ) { 453 453 _seterrre(); 454 return -1;454 return 0; 455 455 } 456 456 … … 466 466 lag *= 1000000; // 1s/ms 467 467 lag /= vss->info.rate; 468 469 if ( lag == 0 ) { 470 _seterr(ROAR_ERROR_NONE); 471 } 468 472 469 473 return lag;
Note: See TracChangeset
for help on using the changeset viewer.