stream: add some \code markers around code blocks

This commit is contained in:
Wim Taymans 2023-08-22 13:11:45 +02:00
parent b9d78d5992
commit 2c2cb9117d

View file

@ -226,10 +226,12 @@ struct pw_stream_control {
* value, and pw_time.ticks, were captured at pw_time.now and can be extrapolated * value, and pw_time.ticks, were captured at pw_time.now and can be extrapolated
* to the current time like this: * to the current time like this:
* *
*\code{.c}
* struct timespec ts; * struct timespec ts;
* clock_gettime(CLOCK_MONOTONIC, &ts); * clock_gettime(CLOCK_MONOTONIC, &ts);
* int64_t diff = SPA_TIMESPEC_TO_NSEC(&ts) - pw_time.now; * int64_t diff = SPA_TIMESPEC_TO_NSEC(&ts) - pw_time.now;
* int64_t elapsed = (pw_time.rate.denom * diff) / (pw_time.rate.num * SPA_NSEC_PER_SEC); * int64_t elapsed = (pw_time.rate.denom * diff) / (pw_time.rate.num * SPA_NSEC_PER_SEC);
*\endcode
* *
* pw_time.delay contains the total delay that a signal will travel through the * pw_time.delay contains the total delay that a signal will travel through the
* graph. This includes the delay caused by filters in the graph as well as delays * graph. This includes the delay caused by filters in the graph as well as delays
@ -255,6 +257,7 @@ struct pw_stream_control {
* in milliseconds for the first sample in the newly queued buffer to be played * in milliseconds for the first sample in the newly queued buffer to be played
* by the hardware can be calculated as: * by the hardware can be calculated as:
* *
*\code{.unparsed}
* (pw_time.buffered * 1000 / stream.samplerate) + * (pw_time.buffered * 1000 / stream.samplerate) +
* (pw_time.queued * 1000 / app.rate) + * (pw_time.queued * 1000 / app.rate) +
* ((pw_time.delay - elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom) * ((pw_time.delay - elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom)
@ -262,8 +265,10 @@ struct pw_stream_control {
* The current extrapolated time (in ms) in the source or sink can be calculated as: * The current extrapolated time (in ms) in the source or sink can be calculated as:
* *
* (pw_time.ticks + elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom * (pw_time.ticks + elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom
*\endcode
* *
* *
*\code{.unparsed}
* stream time domain graph time domain * stream time domain graph time domain
* /-----------------------\/-----------------------------\ * /-----------------------\/-----------------------------\
* *
@ -275,6 +280,7 @@ struct pw_stream_control {
* latency latency * latency latency
* \--------/\-------------/\-----------------------------/ * \--------/\-------------/\-----------------------------/
* queued buffered delay * queued buffered delay
*\endcode
*/ */
struct pw_time { struct pw_time {
int64_t now; /**< the monotonic time in nanoseconds. This is the time int64_t now; /**< the monotonic time in nanoseconds. This is the time