Changeset 3453:cddb31dd11f9 in roaraudio
- Timestamp:
- 02/13/10 19:29:03 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/stream.c
r3452 r3453 613 613 * latencies, but may have strange effects if the application is not 614 614 * able to deal with time going 'backwards'. \since 0.6 */ 615 int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec); 615 int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec) { 616 if ( s == NULL || r_usec == NULL ) 617 return -1; 618 619 *r_usec = s->stream.pos * 1000000 / s->stream.info.rate / s->stream.info.channels; 620 621 return 0; 622 } 616 623 617 624 /** Return the total stream latency. This function is based on … … 619 626 * result can be negative, i.e. the captured samples are not yet 620 627 * played. In this case *negative is set to 1. \since 0.6 */ 621 int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative); 628 int pa_stream_get_latency(pa_stream *s, pa_usec_t *r_usec, int *negative) { 629 // TODO: Fix this: 630 // sinks: lateny of stream, mixer, output... 631 // sources: mixer, output, negative 632 633 if ( r_usec != NULL ) 634 *r_usec = 0; 635 636 if ( negative != NULL ) 637 *negative = 0; 638 639 return 0; 640 } 622 641 623 642 /** Return the latest raw timing data structure. The returned pointer
Note: See TracChangeset
for help on using the changeset viewer.