27 #include "lv_libvisual.h"
28 #include "lv_common.h"
30 #include "lv_alpha_blend.h"
31 #include "lv_fourier.h"
32 #include "lv_plugin_registry.h"
36 #include "private/lv_time_system.hpp"
41 void visual_cpu_initialize (
void);
42 void visual_mem_initialize (
void);
50 RandomSeed random_seed ()
52 return RandomSeed (Time::now ().to_usecs ());
66 static ParamList initial_params ();
70 : params {initial_params ()}
71 , rng {random_seed ()}
74 ParamList System::Impl::initial_params ()
77 visual_param_new_integer (
"songinfo-show",
81 visual_param_new_integer (
"songinfo-timeout",
82 "Songinfo timeout in seconds",
85 visual_param_new_bool (
"songinfo-in-plugins",
86 "Show songinfo in plugins",
89 visual_param_new_integer (
"songinfo-cover-width",
90 "Song cover art width",
92 visual_param_in_range_integer (32, 1000)),
93 visual_param_new_integer (
"songinfo-cover-height",
94 "Song cover art height",
96 visual_param_in_range_integer (32, 1000))
101 LV_API System* Singleton<System>::m_instance =
nullptr;
103 void System::init (
int& argc,
char**& argv)
110 m_instance =
new System (argc, argv);
113 std::string System::get_version ()
const
115 return VISUAL_VERSION
" (" LV_REVISION
")";
118 int System::get_api_version ()
const
120 return VISUAL_API_VERSION;
125 return m_impl->params;
133 void System::set_rng_seed (VisRandomSeed seed)
138 System::System (
int& argc,
char**& argv)
144 bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
145 bind_textdomain_codeset (GETTEXT_PACKAGE,
"UTF-8");
149 visual_cpu_initialize ();
152 visual_mem_initialize ();
155 TimeSystem::start ();
158 PluginRegistry::init ();
164 TimeSystem::shutdown ();