tweak libardour to reflect get_microseconds() move to libpbd
This commit is contained in:
parent
9e598548f7
commit
04df262447
|
@ -83,8 +83,6 @@ namespace ARDOUR {
|
|||
LIBARDOUR_API bool translations_are_enabled ();
|
||||
LIBARDOUR_API bool set_translations_enabled (bool);
|
||||
|
||||
LIBARDOUR_API microseconds_t get_microseconds ();
|
||||
|
||||
LIBARDOUR_API void setup_fpu ();
|
||||
LIBARDOUR_API std::vector<SyncSource> get_available_sync_options();
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "temporal/types.h"
|
||||
|
||||
#include "pbd/id.h"
|
||||
#include "pbd/microseconds.h"
|
||||
|
||||
#include "evoral/Range.h"
|
||||
|
||||
|
@ -77,7 +78,7 @@ typedef float Sample;
|
|||
typedef float pan_t;
|
||||
typedef float gain_t;
|
||||
typedef uint32_t layer_t;
|
||||
typedef uint64_t microseconds_t;
|
||||
typedef PBD::microseconds_t microseconds_t;
|
||||
typedef uint32_t pframes_t;
|
||||
|
||||
/* rebind Temporal position types into ARDOUR namespace */
|
||||
|
|
|
@ -957,28 +957,6 @@ clock_gettime (int /*clk_id*/, struct timespec* t)
|
|||
}
|
||||
#endif
|
||||
|
||||
microseconds_t
|
||||
ARDOUR::get_microseconds ()
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
microseconds_t ret = 0;
|
||||
LARGE_INTEGER freq, time;
|
||||
|
||||
if (QueryPerformanceFrequency (&freq))
|
||||
if (QueryPerformanceCounter (&time))
|
||||
ret = (microseconds_t) ((time.QuadPart * 1000000) / freq.QuadPart);
|
||||
|
||||
return ret;
|
||||
#else
|
||||
struct timespec ts;
|
||||
if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0) {
|
||||
/* EEEK! */
|
||||
return 0;
|
||||
}
|
||||
return (microseconds_t)ts.tv_sec * 1000000 + (ts.tv_nsec / 1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Return the number of bits per sample for a given sample format.
|
||||
*
|
||||
* This is closely related to sndfile_data_width() but does NOT
|
||||
|
|
Loading…
Reference in New Issue
Block a user