Browse Source

Add jack_last_frame().

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@730 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
trutkin 21 years ago
parent
commit
a6a13ba31c
3 changed files with 21 additions and 1 deletions
  1. +1
    -1
      configure.in
  2. +10
    -0
      jack/jack.h
  3. +10
    -0
      libjack/transclient.c

+ 1
- 1
configure.in View File

@@ -15,7 +15,7 @@ dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=98
JACK_MICRO_VERSION=4
JACK_MICRO_VERSION=5

dnl ---
dnl HOWTO: updating the jack protocol version


+ 10
- 0
jack/jack.h View File

@@ -671,6 +671,16 @@ jack_nframes_t jack_frames_since_cycle_start (const jack_client_t *);
*/
jack_nframes_t jack_frame_time (const jack_client_t *);

/**
* @return the frame_time after the last processing of the graph
* this is only to be used from the process callback.
*
* This function can be used to put timestamps generated by
* jack_frame_time() in correlation to the current process cycle.
*/
jack_nframes_t jack_last_frame_time (const jack_client_t *client);


/**
* @return the current CPU load estimated by JACK. This is a running
* average of the time it takes to execute a full process cycle for


+ 10
- 0
libjack/transclient.c View File

@@ -61,6 +61,16 @@ jack_read_frame_time (const jack_client_t *client, jack_frame_timer_t *copy)
} while (copy->guard1 != copy->guard2);
}


jack_nframes_t
jack_last_frame_time (const jack_client_t *client)
{
jack_frame_timer_t current;
jack_read_frame_time (client, &current);
return current.frames;
}


/* copy a JACK transport position structure (thread-safe) */
void
jack_transport_copy_position (jack_position_t *from, jack_position_t *to)


Loading…
Cancel
Save