[beast: 10/15] BSE: provide tick_stamp_from_systime()



commit 7866f768dacabf3ed2db37686bcd123b559cc59f
Author: Tim Janik <timj gnu org>
Date:   Thu Oct 27 21:52:18 2016 +0200

    BSE: provide tick_stamp_from_systime()
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bseapi.idl   |    3 +++
 bse/bseserver.cc |    6 ++++++
 bse/bseserver.hh |    5 +++--
 3 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index 0379f34..d0d0e50 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -946,6 +946,9 @@ interface Server : Object {
   CategorySeq category_match_typed (String pattern, String type_name); ///< List BSE categories according to 
a pattern and type match.
   CategorySeq category_match       (String pattern);                   ///< List BSE categories according to 
a pattern match.
 
+  /// Helper for Wave PCM positioning.
+  int64       tick_stamp_from_systime (int64 systime_usecs);
+
   // *** Old Janitor ***
   // void   trigger_action   (String action); ///< Trigger an installed user action of this janitor.
   // String get_script_name  (); ///< Retrieve the script name of this janitor.
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 7046008..58d6660 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -1623,4 +1623,10 @@ ServerImpl::category_match (const String &pattern)
   return bse_categories_match_typed (pattern, 0);
 }
 
+int64
+ServerImpl::tick_stamp_from_systime (int64 systime_usecs)
+{
+  return bse_engine_tick_stamp_from_systime (systime_usecs);
+}
+
 } // Bse
diff --git a/bse/bseserver.hh b/bse/bseserver.hh
index 20809c8..7297b7d 100644
--- a/bse/bseserver.hh
+++ b/bse/bseserver.hh
@@ -134,8 +134,9 @@ public:
   virtual NoteDescription note_from_string (MusicalTuning musical_tuning, const String &name) override;
   virtual int             note_from_freq   (MusicalTuning musical_tuning, double frequency) override;
   virtual double          note_to_freq     (MusicalTuning musical_tuning, int note, int fine_tune) override;
-  virtual CategorySeq     category_match_typed (const String &pattern, const String &type_name) override;
-  virtual CategorySeq     category_match       (const String &pattern) override;
+  virtual CategorySeq     category_match_typed    (const String &pattern, const String &type_name) override;
+  virtual CategorySeq     category_match          (const String &pattern) override;
+  virtual int64           tick_stamp_from_systime (int64 systime_usecs) override;
   void               send_user_message      (const UserMessage &umsg);
   static void        register_source_module (const String &type, const String &title, const String &tags, 
const uint8 *pixstream);
   static ServerImpl& instance               ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]