Description: Add API to change projectM preset duration
Forwarded: no
Last-Update: 2010-10-19
--- a/src/libprojectM/TimeKeeper.hpp
+++ b/src/libprojectM/TimeKeeper.hpp
@@ -37,6 +37,8 @@
 
   double sampledPresetDuration();
 
+  void ChangePresetDuration(int seconds) { _presetDuration = seconds; }
+
 #ifndef WIN32
   /* The first ticks value of the application */
   struct timeval startTime;
--- a/src/libprojectM/projectM.cpp
+++ b/src/libprojectM/projectM.cpp
@@ -907,3 +907,7 @@
                           _settings.textureSize, beatDetect, _settings.presetURL,
                           _settings.titleFontURL, _settings.menuFontURL);
 }
+
+void projectM::changePresetDuration(int seconds) {
+  timeKeeper->ChangePresetDuration(seconds);
+}
--- a/src/libprojectM/projectM.hpp
+++ b/src/libprojectM/projectM.hpp
@@ -154,7 +154,7 @@
   virtual ~projectM();
 
   void changeTextureSize(int size);
-
+  void changePresetDuration(int seconds);
 
   const Settings & settings() const {
 		return _settings;
