diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-16 00:05:56 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-16 00:05:56 +0000 |
commit | f9e2058820c2a51994708ad11d1ed8e09b12b8b1 (patch) | |
tree | 5277545f0b8b9534590d20c32d0d3e1acc2a9982 /polyp/polyplib-def.h | |
parent | f5d47a293aa32a8273ef02c597cb263527726465 (diff) |
add input latency measurement
add GETOSPACE support to module-oss
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@205 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-def.h')
-rw-r--r-- | polyp/polyplib-def.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/polyp/polyplib-def.h b/polyp/polyplib-def.h index 9bba3f32..29f5eb43 100644 --- a/polyp/polyplib-def.h +++ b/polyp/polyplib-def.h @@ -132,20 +132,26 @@ enum pa_subscription_event_type { /** Return one if an event type t matches an event mask bitfield */ #define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK)))) -/** A structure for latency info. See pa_stream_get_latency(). The - * total latency a sample that is written with pa_stream_write() takes - * to be played may be estimated by - * buffer_usec+sink_usec+transport_usec. The buffer to which +/** A structure for latency info. See pa_stream_get_latency(). The + * total output latency a sample that is written with + * pa_stream_write() takes to be played may be estimated by + * sink_usec+buffer_usec+transport_usec. The output buffer to which * buffer_usec relates may be manipulated freely (with * pa_stream_write()'s delta argument, pa_stream_flush() and friends), - * the playback buffer sink_usec relates to is a FIFO which cannot be - * flushed or manipulated in any way. */ + * the buffers sink_usec/source_usec relates to is a first-in + * first-out buffer which cannot be flushed or manipulated in any + * way. The total input latency a sample that is recorded takes to be + * delivered to the application is: + * source_usec+buffer_usec+transport_usec-sink_usec. (Take care of + * sign issues!) When connected to a monitor source sink_usec contains + * the latency of the owning sink.*/ struct pa_latency_info { - pa_usec_t buffer_usec; /**< Time in usecs the current buffer takes to play */ - pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. */ - pa_usec_t transport_usec; /**< Estimated time in usecs a sample takes to be transferred to the daemon. \since 0.5 */ - int playing; /**< Non-zero when the stream is currently playing */ - uint32_t queue_length; /**< Queue size in bytes. */ + pa_usec_t buffer_usec; /**< Time in usecs the current buffer takes to play. For both playback and record streams. */ + pa_usec_t sink_usec; /**< Time in usecs a sample takes to be played on the sink. For playback streams and record streams connected to a monitor source. */ + pa_usec_t source_usec; /**< Time in usecs a sample takes from being recorded to being delivered to the application. Only for record streams. \since 0.5*/ + pa_usec_t transport_usec; /**< Estimated time in usecs a sample takes to be transferred to/from the daemon. For both playback and record streams. \since 0.5 */ + int playing; /**< Non-zero when the stream is currently playing. Only for playback streams. */ + uint32_t queue_length; /**< Queue size in bytes. For both playback and recrd streams. */ int synchronized_clocks; /**< Non-zero if the local and the * remote machine have synchronized * clocks. If synchronized clocks are |