Loading...
Searching...
No Matches
gx_system.h
Go to the documentation of this file.
/*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
* Copyright (C) 2011 Pete Shorthose
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/* ------- This is the System namespace ------- */
#pragma once
#ifndef SRC_HEADERS_GX_SYSTEM_H_
#define SRC_HEADERS_GX_SYSTEM_H_
#ifndef NDEBUG
#include <fenv.h>
#ifdef __i386__
#define FE_DENORM __FE_DENORM
inline void clear_fpu_status_bits() { __asm__ ("fnclex"); }
inline unsigned int get_fpu_status_bits() {
unsigned int fpu_status __attribute__ ((__mode__ (__HI__)));
__asm__("fnstsw %0" : "=m" (*&fpu_status));
return fpu_status;
}
#else
inline void clear_fpu_status_bits() { feclearexcept(FE_ALL_EXCEPT); }
inline unsigned int get_fpu_status_bits() {
fexcept_t flagp;
int ret = fegetexceptflag(&flagp, FE_ALL_EXCEPT);
assert(ret == 0);
return flagp;
}
#endif //__i386__
#endif // !NDEBUG
#ifdef __SSE__
/* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
flags to avoid costly denormals */
#ifdef __SSE3__
#ifndef _PMMINTRIN_H_INCLUDED
#include <pmmintrin.h>
#endif //ndef
inline void AVOIDDENORMALS() {
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
}
#else
#ifndef _XMMINTRIN_H_INCLUDED
#include <xmmintrin.h>
#endif //ndef
inline void AVOIDDENORMALS() { _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); }
#endif //__SSE3__
#else
#ifndef _XMMINTRIN_H_INCLUDED
inline void _MM_SET_EXCEPTION_STATE(unsigned int __mask) {}
inline unsigned int _MM_GET_EXCEPTION_STATE(void) { return 0; }
#endif //ndef
inline void AVOIDDENORMALS() {}
#endif //__SSE__
/* constant defines */
#define ASCII_START (48)
#define GDK_NO_MOD_MASK (GdkModifierType)0
#define SYSTEM_OK (0)
namespace gx_system {
/****************************************************************
** "atomic" value access
*/
inline void atomic_set(volatile int* p, int v) {
g_atomic_int_set(p, v);
}
inline void atomic_set(volatile unsigned int* p, unsigned int v) {
g_atomic_int_set(reinterpret_cast<volatile int*>(p), v);
}
inline int atomic_get(volatile int& p) {
return g_atomic_int_get(&p);
}
inline unsigned int atomic_get(volatile unsigned int& p) {
return g_atomic_int_get(reinterpret_cast<volatile int*>(&p));
}
inline void atomic_inc(volatile int* p) {
g_atomic_int_inc(p);
}
inline void atomic_inc(volatile unsigned int* p) {
g_atomic_int_inc(reinterpret_cast<volatile int*>(p));
}
inline bool atomic_compare_and_exchange(volatile int *p, int oldv, int newv) {
#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 68 && GLIB_MICRO_VERSION < 1)
return g_atomic_int_compare_and_exchange(p, oldv, newv);
#else
return g_atomic_int_compare_and_exchange(const_cast<int*>(p), oldv, newv);
#endif
}
template <class T>
inline void atomic_set(T **p, T *v) {
g_atomic_pointer_set(p, v);
}
template <class T>
inline void atomic_set_0(T **p) {
g_atomic_pointer_set(p, 0);
}
template <class T>
inline T *atomic_get(T*& p) {
return static_cast<T*>(g_atomic_pointer_get(&p));
}
template <class T>
inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv) {
return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void**>(p), static_cast<void*>(oldv), newv);
}
/****************************************************************
** Measuring times
*/
#ifndef NDEBUG
class Accum {
private:
int n;
int mn;
int mx;
float sx;
float sx2;
public:
Accum() { reset(); }
inline void reset() {
n = 0;
mn = 1e9;
mx = 0;
sx = 0;
sx2 = 0;
}
void add(int diff);
int count() const { return n; }
float mean() const { return sx / n; }
float stddev() const { return std::sqrt((n * sx2 - sx * sx) / (n * (n-1))); }
float minimum() const { return mn; }
float maximum() const { return mx; }
};
inline void Accum::add(int diff) {
n += 1;
sx += diff;
sx2 += static_cast<float>(diff) * diff;
mn = std::min(mn, diff);
mx = std::max(mx, diff);
}
struct Measure {
Accum period;
Accum duration;
Accum duration1;
Accum duration2;
unsigned int FPUStatus1;
unsigned int MXStatus1;
unsigned int FPUStatus2;
unsigned int MXStatus2;
inline float ns2ms(int n) const { return n * 1e-6; }
void reset();
Measure() { reset(); }
void print_accum(const Accum& accum, const char* prefix, bool verbose, int total = 0) const;
void print(bool verbose) const;
};
class MeasureThreadsafe {
private:
Measure m[2];
Measure *pmeasure;
timespec t1s;
timespec t1e;
timespec t2s;
timespec t1old;
unsigned int FPUStatus;
unsigned int MXStatus;
inline Measure *access() { return atomic_get(pmeasure); }
inline int ts_diff(const timespec& ts1, const timespec& ts2);
public:
MeasureThreadsafe();
inline void start() {
clear_fpu_status_bits();
_MM_SET_EXCEPTION_STATE(0);
clock_gettime(CLOCK_MONOTONIC, &t1s);
}
inline void pause() {
clock_gettime(CLOCK_MONOTONIC, &t1e);
FPUStatus = get_fpu_status_bits();
MXStatus = _MM_GET_EXCEPTION_STATE();
}
inline void cont() {
clear_fpu_status_bits();
_MM_SET_EXCEPTION_STATE(0);
clock_gettime(CLOCK_MONOTONIC, &t2s);
}
inline void stop();
void print(bool verbose = false);
};
/* return time difference in ns, fail if > sec (doesn't fit int 32 bit int) */
inline int MeasureThreadsafe::ts_diff(const timespec& ts1, const timespec& ts2) {
time_t df = ts1.tv_sec - ts2.tv_sec;
if (std::abs(df) > 2) {
return -1; // failed
}
return df * 1000000000 + (ts1.tv_nsec - ts2.tv_nsec);
}
inline void MeasureThreadsafe::stop() {
Measure& m = *access();
timespec n;
clock_gettime(CLOCK_MONOTONIC, &n);
m.FPUStatus2 |= get_fpu_status_bits();
m.MXStatus2 |= _MM_GET_EXCEPTION_STATE();
m.FPUStatus1 |= FPUStatus;
m.MXStatus1 |= MXStatus;
if (!(t1old.tv_sec == 0 && t1old.tv_nsec == 0)) {
m.period.add(ts_diff(t1s, t1old));
}
t1old = t1s;
m.duration1.add(ts_diff(t1e, t1s));
m.duration2.add(ts_diff(n, t2s));
m.duration.add(ts_diff(n, t1s));
}
extern MeasureThreadsafe measure;
void add_time_measurement();
inline void measure_start() { measure.start(); }
inline void measure_pause() { measure.pause(); }
inline void measure_cont() { measure.cont(); }
inline void measure_stop() { measure.stop(); }
#else
inline void measure_start() {}
inline void measure_pause() {}
inline void measure_cont() {}
inline void measure_stop() {}
#endif
/****************************************************************/
class SkinHandling {
public:
Glib::ustring name;
std::vector<Glib::ustring> skin_list;
SkinHandling(const std::string& styledir)
: name(), skin_list() { set_styledir(styledir); }
void set_styledir(const std::string& styledir);
bool is_in_list(const std::string& skin_name);
const Glib::ustring& operator[](unsigned int idx);
unsigned int index(const Glib::ustring& skin_name);
string get_cssfile() const;
void set_default_skin_name();
};
/****************************************************************/
class PathList {
public:
typedef std::list< Glib::RefPtr<Gio::File> > pathlist;
typedef std::list< Glib::RefPtr<Gio::File> >::const_iterator iterator;
private:
pathlist dirs;
public:
PathList(const char *env_name = 0);
void add(const std::string& d) { dirs.push_back(Gio::File::create_for_path(d)); }
bool contains(const std::string& d) const;
bool find_dir(std::string *d, const std::string& filename) const;
size_t size() { return dirs.size(); }
iterator begin() { return dirs.begin(); }
iterator end() { return dirs.end(); }
};
/****************************************************************/
class PrefixConverter {
public:
typedef std::map<char,std::string> symbol_path_map;
private:
symbol_path_map dirs;
public:
PrefixConverter(): dirs() {}
~PrefixConverter() {}
std::string replace_symbol(const std::string& dir) const;
std::string replace_path(const std::string& dir) const;
void add(char s, const std::string& d);
void replace(char s, const std::string& d);
const symbol_path_map& get_symbol_path_map() { return dirs;}
};
/*****************************************************************
** class DirectoryListing
*/
class FileName {
public:
std::string filename;
Glib::ustring displayname;
FileName(const std::string& filename_, const Glib::ustring& displayname_)
: filename(filename_), displayname(displayname_) {}
};
class IRFileListing {
public:
private:
std::vector<FileName> listing;
public:
IRFileListing(const std::string& path);
~IRFileListing() {}
std::vector<FileName>& get_listing() { return listing; }
};
void list_subdirs(PathList pl, std::vector<FileName>& dirs);
/****************************************************************
** class CmdlineOptions
*/
#define RPCPORT_DEFAULT (-2)
#define RPCPORT_NONE (-1)
class BasicOptions: boost::noncopyable {
private:
std::string user_dir;
std::string user_IR_dir;
std::string sys_IR_dir;
PathList IR_pathlist;
PrefixConverter IR_prefixmap;
static BasicOptions *instance;
protected:
std::string builder_dir;
private:
friend BasicOptions& get_options();
protected:
static void make_ending_slash(std::string& dirpath);
public:
#ifdef GUITARIX_AS_PLUGIN
BasicOptions(const char *modulepath);
void replace_sysIRDir(const std::string& dir);
#else
BasicOptions();
#endif
~BasicOptions();
std::string get_user_filepath(const std::string& basename) const { return user_dir + basename; }
std::string get_user_ir_filepath(const std::string& basename) const { return user_IR_dir + basename; }
std::string get_builder_filepath(const std::string& basename) const { return builder_dir + basename; }
void set_user_dir(std::string dir) { user_dir = dir; }
void set_user_IR_dir(std::string dir) { user_IR_dir = dir; }
const std::string& get_user_dir() const { return user_dir; }
const std::string& get_user_IR_dir() const { return user_IR_dir; }
const std::string& get_sys_IR_dir() const { return sys_IR_dir; }
const PathList& get_IR_pathlist() const { return IR_pathlist; }
const PrefixConverter& get_IR_prefixmap() const { return IR_prefixmap; }
};
class CmdlineOptions: public BasicOptions, public Glib::OptionContext {
private:
Glib::OptionGroup main_group;
Glib::OptionGroup optgroup_style;
Glib::OptionGroup optgroup_jack;
Glib::OptionGroup optgroup_overload;
Glib::OptionGroup optgroup_file;
Glib::OptionGroup optgroup_debug;
std::string path_to_program;
bool version;
bool clear;
Glib::ustring jack_input;
Glib::ustring jack_midi;
Glib::ustring jack_instance;
std::vector<Glib::ustring> jack_outputs;
Glib::ustring jack_uuid;
Glib::ustring jack_uuid2;
bool jack_noconnect;
bool jack_single;
Glib::ustring jack_servername;
std::string load_file;
std::string style_dir;
std::string factory_dir;
std::string pixmap_dir;
std::string old_user_dir;
std::string preset_dir;
std::string pluginpreset_dir;
std::string lv2_preset_dir;
std::string temp_dir;
std::string plugin_dir;
std::string loop_dir;
Glib::ustring rcset;
bool nogui;
int rpcport;
Glib::ustring rpcaddress;
bool onlygui;
bool liveplaygui;
bool hideonquit;
bool mute;
Glib::ustring setbank;
Glib::ustring cmdline_bank;
Glib::ustring cmdline_preset;
Glib::ustring tuner_tet;
Glib::ustring tuner_ref;
int sporadic_overload;
int idle_thread_timeout;
bool convolver_watchdog;
bool watchdog_warning;
bool xrun_watchdog;
bool lterminal;
bool a_save;
bool auto_save;
std::string get_opskin();
public:
#ifndef NDEBUG
bool dump_parameter;
#endif
SkinHandling skin;
void read_ui_vars();
void write_ui_vars();
// saved in ui_rc:
int mainwin_visible;
int mainwin_x;
int mainwin_y;
int mainwin_height;
int window_height;
int preset_window_height;
int mul_buffer;
bool no_warn_latency;
bool system_order_rack_h;
bool system_show_value;
bool system_show_tooltips;
bool system_animations;
bool system_show_presets;
bool system_show_toolbar;
bool system_show_rack;
bool system_midiout;
bool system_tuner_midiout;
bool reload_lv2_presets;
public:
#ifdef GUITARIX_AS_PLUGIN
CmdlineOptions(const char *modulepath);
#else
CmdlineOptions();
#endif
~CmdlineOptions();
void process(int argc, char** argv);
const std::string& get_path_to_program() const { return path_to_program; }
std::string get_style_filepath(const std::string& basename) const { return style_dir + basename; }
std::string get_current_style_cssfile() const { return get_style_filepath(skin.get_cssfile()); }
std::string get_pixmap_filepath(const std::string& basename) const { return pixmap_dir + basename; }
std::string get_preset_filepath(const std::string& basename) const { return preset_dir + basename; }
std::string get_plugin_filepath(const std::string& basename) const { return plugin_dir + basename; }
std::string get_factory_filepath(const std::string& basename) const { return factory_dir + basename; }
std::string get_temp_filepath(const std::string& basename) const { return temp_dir + basename; }
std::string get_pluginpreset_filepath(const std::string& id, bool factory) const {
return (factory ? factory_dir : pluginpreset_dir) + id; }
std::string get_lv2_preset_filepath(const std::string& id) const {
return (lv2_preset_dir) + id; }
const std::string& get_old_user_dir() const { return old_user_dir; }
const std::string& get_plugin_dir() const { return plugin_dir; }
const std::string& get_preset_dir() const { return preset_dir; }
const std::string& get_pluginpreset_dir() const { return pluginpreset_dir; }
const std::string& get_lv2_preset_dir() const { return lv2_preset_dir; }
const std::string& get_loop_dir() const { return loop_dir; }
const std::string& get_temp_dir() const { return temp_dir; }
void set_plugin_dir(std::string dir) { plugin_dir = dir; }
void set_preset_dir(std::string dir) { preset_dir = dir; }
void set_pluginpreset_dir(std::string dir) { pluginpreset_dir = dir; }
void set_lv2_preset_dir(std::string dir) { lv2_preset_dir = dir; }
void set_loop_dir(std::string dir) { loop_dir = dir; }
void set_temp_dir(std::string dir) { temp_dir = dir; }
const std::string& get_factory_dir() const { return factory_dir; }
const std::string& get_style_dir() const { return style_dir; }
std::string get_ladspa_config_filename() const { return get_user_filepath("ladspa_defs.js"); }
std::string get_online_config_filename() const { return get_user_filepath("musical-artifacts.js"); }
std::string get_online_presets_filename() const { return get_user_filepath("artifacts.js"); }
const Glib::ustring& get_rcset() const { return rcset; }
bool get_clear_rc() const { return clear; }
bool get_nogui() const { return nogui; }
bool get_liveplaygui() const { return liveplaygui; }
bool get_hideonquit() const { return hideonquit; }
void set_hideonquit(bool set) { hideonquit = set; }
bool get_mute() const { return mute; }
const Glib::ustring& get_setbank() { return setbank; }
void set_bank_preset(const Glib::ustring& bank, const Glib::ustring& preset) {
cmdline_bank = bank; cmdline_preset = preset; }
const Glib::ustring& get_cmdline_bank() { return cmdline_bank; }
const Glib::ustring& get_cmdline_preset() { return cmdline_preset; }
const Glib::ustring& get_tuner_tet() { return tuner_tet; }
const Glib::ustring& get_tuner_ref() { return tuner_ref; }
int get_rpcport() const { return rpcport; }
void set_rpcport(int port) { rpcport = port; }
const Glib::ustring& get_rpcaddress() { return rpcaddress; }
void set_rpcaddress(const Glib::ustring& address) { rpcaddress = address; }
const std::string& get_loadfile() const { return load_file; }
const Glib::ustring& get_jack_instancename() const { return jack_instance; }
void set_jack_instancename(std::string name) { jack_instance = name; }
const Glib::ustring& get_jack_uuid() const { return jack_uuid; }
const Glib::ustring& get_jack_uuid2() const { return jack_uuid2; }
const Glib::ustring& get_jack_midi() const { return jack_midi; }
const Glib::ustring& get_jack_input() const { return jack_input; }
const Glib::ustring& get_jack_servername() const { return jack_servername; }
bool get_jack_noconnect() const { return jack_noconnect; }
bool get_jack_single() const { return jack_single; }
void set_jack_noconnect(bool set) { jack_noconnect = set; }
void set_jack_single(bool set) { jack_single = set; }
bool get_opt_save_on_exit() const { return a_save; }
bool get_opt_autosave() const { return auto_save; }
void set_opt_autosave(bool set) { auto_save = set; }
Glib::ustring get_jack_output(unsigned int n) const;
int get_idle_thread_timeout() const { return idle_thread_timeout; }
int get_sporadic_overload() const { return sporadic_overload; }
bool get_xrun_watchdog() const { return xrun_watchdog; }
bool get_convolver_watchdog() const { return convolver_watchdog; }
bool get_watchdog_warning() const { return watchdog_warning; }
};
inline BasicOptions& get_options() {
assert(BasicOptions::instance);
return *BasicOptions::instance;
}
/****************************************************************
** misc function declarations
*/
int gx_system_call(const std::string&, bool devnull = false, bool escape = false);
void strip(Glib::ustring& s);
template <class T>
inline std::string to_string(const T& t) {
std::stringstream ss;
ss << t;
return ss.str();
}
std::string encode_filename(const std::string& s);
std::string decode_filename(const std::string& s);
} /* end of gx_system namespace */
#endif // SRC_HEADERS_GX_SYSTEM_H_
gx_system::Accum
Definition gx_system.h:149
gx_system::Accum::count
int count() const
Definition gx_system.h:166
gx_system::Accum::sx
float sx
Definition gx_system.h:154
gx_system::Accum::minimum
float minimum() const
Definition gx_system.h:169
gx_system::Accum::sx2
float sx2
Definition gx_system.h:155
gx_system::Accum::reset
void reset()
Definition gx_system.h:158
gx_system::Accum::mn
int mn
Definition gx_system.h:152
gx_system::Accum::mx
int mx
Definition gx_system.h:153
gx_system::Accum::n
int n
Definition gx_system.h:151
gx_system::Accum::stddev
float stddev() const
Definition gx_system.h:168
gx_system::Accum::add
void add(int diff)
Definition gx_system.h:173
gx_system::Accum::maximum
float maximum() const
Definition gx_system.h:170
gx_system::Accum::Accum
Accum()
Definition gx_system.h:157
gx_system::Accum::mean
float mean() const
Definition gx_system.h:167
gx_system::BasicOptions::IR_prefixmap
PrefixConverter IR_prefixmap
Definition gx_system.h:366
gx_system::BasicOptions::get_builder_filepath
std::string get_builder_filepath(const std::string &basename) const
Definition gx_system.h:385
gx_system::BasicOptions::make_ending_slash
static void make_ending_slash(std::string &dirpath)
gx_system::BasicOptions::set_user_dir
void set_user_dir(std::string dir)
Definition gx_system.h:386
gx_system::BasicOptions::BasicOptions
BasicOptions()
gx_system::BasicOptions::get_IR_pathlist
const PathList & get_IR_pathlist() const
Definition gx_system.h:391
gx_system::BasicOptions::~BasicOptions
~BasicOptions()
gx_system::BasicOptions::IR_pathlist
PathList IR_pathlist
Definition gx_system.h:365
gx_system::BasicOptions::get_user_IR_dir
const std::string & get_user_IR_dir() const
Definition gx_system.h:389
gx_system::BasicOptions::instance
static BasicOptions * instance
Definition gx_system.h:367
gx_system::BasicOptions::get_user_dir
const std::string & get_user_dir() const
Definition gx_system.h:388
gx_system::BasicOptions::get_user_ir_filepath
std::string get_user_ir_filepath(const std::string &basename) const
Definition gx_system.h:384
gx_system::BasicOptions::get_IR_prefixmap
const PrefixConverter & get_IR_prefixmap() const
Definition gx_system.h:392
gx_system::BasicOptions::get_user_filepath
std::string get_user_filepath(const std::string &basename) const
Definition gx_system.h:383
gx_system::BasicOptions::builder_dir
std::string builder_dir
Definition gx_system.h:369
gx_system::BasicOptions::sys_IR_dir
std::string sys_IR_dir
Definition gx_system.h:364
gx_system::BasicOptions::set_user_IR_dir
void set_user_IR_dir(std::string dir)
Definition gx_system.h:387
gx_system::BasicOptions::user_IR_dir
std::string user_IR_dir
Definition gx_system.h:363
gx_system::BasicOptions::user_dir
std::string user_dir
Definition gx_system.h:362
gx_system::BasicOptions::get_options
friend BasicOptions & get_options()
Definition gx_system.h:558
gx_system::BasicOptions::get_sys_IR_dir
const std::string & get_sys_IR_dir() const
Definition gx_system.h:390
gx_system::CmdlineOptions::lterminal
bool lterminal
Definition gx_system.h:444
gx_system::CmdlineOptions::path_to_program
std::string path_to_program
Definition gx_system.h:403
gx_system::CmdlineOptions::get_setbank
const Glib::ustring & get_setbank()
Definition gx_system.h:524
gx_system::CmdlineOptions::tuner_ref
Glib::ustring tuner_ref
Definition gx_system.h:438
gx_system::CmdlineOptions::CmdlineOptions
CmdlineOptions()
gx_system::CmdlineOptions::get_rcset
const Glib::ustring & get_rcset() const
Definition gx_system.h:517
gx_system::CmdlineOptions::temp_dir
std::string temp_dir
Definition gx_system.h:423
gx_system::CmdlineOptions::plugin_dir
std::string plugin_dir
Definition gx_system.h:424
gx_system::CmdlineOptions::set_preset_dir
void set_preset_dir(std::string dir)
Definition gx_system.h:506
gx_system::CmdlineOptions::rpcaddress
Glib::ustring rpcaddress
Definition gx_system.h:429
gx_system::CmdlineOptions::get_plugin_dir
const std::string & get_plugin_dir() const
Definition gx_system.h:498
gx_system::CmdlineOptions::preset_dir
std::string preset_dir
Definition gx_system.h:420
gx_system::CmdlineOptions::system_animations
bool system_animations
Definition gx_system.h:469
gx_system::CmdlineOptions::no_warn_latency
bool no_warn_latency
Definition gx_system.h:465
gx_system::CmdlineOptions::jack_servername
Glib::ustring jack_servername
Definition gx_system.h:414
gx_system::CmdlineOptions::set_opt_autosave
void set_opt_autosave(bool set)
Definition gx_system.h:549
gx_system::CmdlineOptions::get_online_config_filename
std::string get_online_config_filename() const
Definition gx_system.h:515
gx_system::CmdlineOptions::jack_midi
Glib::ustring jack_midi
Definition gx_system.h:407
gx_system::CmdlineOptions::mute
bool mute
Definition gx_system.h:433
gx_system::CmdlineOptions::system_show_tooltips
bool system_show_tooltips
Definition gx_system.h:468
gx_system::CmdlineOptions::set_jack_instancename
void set_jack_instancename(std::string name)
Definition gx_system.h:537
gx_system::CmdlineOptions::get_opt_save_on_exit
bool get_opt_save_on_exit() const
Definition gx_system.h:547
gx_system::CmdlineOptions::clear
bool clear
Definition gx_system.h:405
gx_system::CmdlineOptions::system_show_value
bool system_show_value
Definition gx_system.h:467
gx_system::CmdlineOptions::reload_lv2_presets
bool reload_lv2_presets
Definition gx_system.h:475
gx_system::CmdlineOptions::optgroup_jack
Glib::OptionGroup optgroup_jack
Definition gx_system.h:399
gx_system::CmdlineOptions::get_temp_filepath
std::string get_temp_filepath(const std::string &basename) const
Definition gx_system.h:492
gx_system::CmdlineOptions::get_tuner_tet
const Glib::ustring & get_tuner_tet()
Definition gx_system.h:529
gx_system::CmdlineOptions::get_lv2_preset_filepath
std::string get_lv2_preset_filepath(const std::string &id) const
Definition gx_system.h:495
gx_system::CmdlineOptions::get_plugin_filepath
std::string get_plugin_filepath(const std::string &basename) const
Definition gx_system.h:490
gx_system::CmdlineOptions::rpcport
int rpcport
Definition gx_system.h:428
gx_system::CmdlineOptions::get_rpcport
int get_rpcport() const
Definition gx_system.h:531
gx_system::CmdlineOptions::nogui
bool nogui
Definition gx_system.h:427
gx_system::CmdlineOptions::system_midiout
bool system_midiout
Definition gx_system.h:473
gx_system::CmdlineOptions::get_watchdog_warning
bool get_watchdog_warning() const
Definition gx_system.h:555
gx_system::CmdlineOptions::get_lv2_preset_dir
const std::string & get_lv2_preset_dir() const
Definition gx_system.h:501
gx_system::CmdlineOptions::optgroup_file
Glib::OptionGroup optgroup_file
Definition gx_system.h:401
gx_system::CmdlineOptions::old_user_dir
std::string old_user_dir
Definition gx_system.h:419
gx_system::CmdlineOptions::get_clear_rc
bool get_clear_rc() const
Definition gx_system.h:518
gx_system::CmdlineOptions::~CmdlineOptions
~CmdlineOptions()
gx_system::CmdlineOptions::jack_outputs
std::vector< Glib::ustring > jack_outputs
Definition gx_system.h:409
gx_system::CmdlineOptions::system_order_rack_h
bool system_order_rack_h
Definition gx_system.h:466
gx_system::CmdlineOptions::optgroup_overload
Glib::OptionGroup optgroup_overload
Definition gx_system.h:400
gx_system::CmdlineOptions::get_jack_input
const Glib::ustring & get_jack_input() const
Definition gx_system.h:541
gx_system::CmdlineOptions::get_pluginpreset_filepath
std::string get_pluginpreset_filepath(const std::string &id, bool factory) const
Definition gx_system.h:493
gx_system::CmdlineOptions::set_pluginpreset_dir
void set_pluginpreset_dir(std::string dir)
Definition gx_system.h:507
gx_system::CmdlineOptions::get_ladspa_config_filename
std::string get_ladspa_config_filename() const
Definition gx_system.h:514
gx_system::CmdlineOptions::read_ui_vars
void read_ui_vars()
gx_system::CmdlineOptions::get_cmdline_preset
const Glib::ustring & get_cmdline_preset()
Definition gx_system.h:528
gx_system::CmdlineOptions::optgroup_debug
Glib::OptionGroup optgroup_debug
Definition gx_system.h:402
gx_system::CmdlineOptions::get_jack_instancename
const Glib::ustring & get_jack_instancename() const
Definition gx_system.h:536
gx_system::CmdlineOptions::get_sporadic_overload
int get_sporadic_overload() const
Definition gx_system.h:552
gx_system::CmdlineOptions::get_mute
bool get_mute() const
Definition gx_system.h:523
gx_system::CmdlineOptions::system_show_rack
bool system_show_rack
Definition gx_system.h:472
gx_system::CmdlineOptions::get_preset_filepath
std::string get_preset_filepath(const std::string &basename) const
Definition gx_system.h:489
gx_system::CmdlineOptions::get_liveplaygui
bool get_liveplaygui() const
Definition gx_system.h:520
gx_system::CmdlineOptions::get_tuner_ref
const Glib::ustring & get_tuner_ref()
Definition gx_system.h:530
gx_system::CmdlineOptions::window_height
int window_height
Definition gx_system.h:462
gx_system::CmdlineOptions::main_group
Glib::OptionGroup main_group
Definition gx_system.h:397
gx_system::CmdlineOptions::get_hideonquit
bool get_hideonquit() const
Definition gx_system.h:521
gx_system::CmdlineOptions::get_loop_dir
const std::string & get_loop_dir() const
Definition gx_system.h:502
gx_system::CmdlineOptions::jack_input
Glib::ustring jack_input
Definition gx_system.h:406
gx_system::CmdlineOptions::set_bank_preset
void set_bank_preset(const Glib::ustring &bank, const Glib::ustring &preset)
Definition gx_system.h:525
gx_system::CmdlineOptions::get_temp_dir
const std::string & get_temp_dir() const
Definition gx_system.h:503
gx_system::CmdlineOptions::sporadic_overload
int sporadic_overload
Definition gx_system.h:439
gx_system::CmdlineOptions::set_rpcport
void set_rpcport(int port)
Definition gx_system.h:532
gx_system::CmdlineOptions::get_jack_uuid
const Glib::ustring & get_jack_uuid() const
Definition gx_system.h:538
gx_system::CmdlineOptions::set_lv2_preset_dir
void set_lv2_preset_dir(std::string dir)
Definition gx_system.h:508
gx_system::CmdlineOptions::style_dir
std::string style_dir
Definition gx_system.h:416
gx_system::CmdlineOptions::preset_window_height
int preset_window_height
Definition gx_system.h:463
gx_system::CmdlineOptions::write_ui_vars
void write_ui_vars()
gx_system::CmdlineOptions::set_hideonquit
void set_hideonquit(bool set)
Definition gx_system.h:522
gx_system::CmdlineOptions::optgroup_style
Glib::OptionGroup optgroup_style
Definition gx_system.h:398
gx_system::CmdlineOptions::skin
SkinHandling skin
Definition gx_system.h:453
gx_system::CmdlineOptions::get_preset_dir
const std::string & get_preset_dir() const
Definition gx_system.h:499
gx_system::CmdlineOptions::set_plugin_dir
void set_plugin_dir(std::string dir)
Definition gx_system.h:505
gx_system::CmdlineOptions::get_cmdline_bank
const Glib::ustring & get_cmdline_bank()
Definition gx_system.h:527
gx_system::CmdlineOptions::get_opskin
std::string get_opskin()
gx_system::CmdlineOptions::cmdline_preset
Glib::ustring cmdline_preset
Definition gx_system.h:436
gx_system::CmdlineOptions::mainwin_height
int mainwin_height
Definition gx_system.h:461
gx_system::CmdlineOptions::get_opt_autosave
bool get_opt_autosave() const
Definition gx_system.h:548
gx_system::CmdlineOptions::factory_dir
std::string factory_dir
Definition gx_system.h:417
gx_system::CmdlineOptions::get_jack_output
Glib::ustring get_jack_output(unsigned int n) const
gx_system::CmdlineOptions::get_factory_dir
const std::string & get_factory_dir() const
Definition gx_system.h:512
gx_system::CmdlineOptions::set_temp_dir
void set_temp_dir(std::string dir)
Definition gx_system.h:510
gx_system::CmdlineOptions::version
bool version
Definition gx_system.h:404
gx_system::CmdlineOptions::liveplaygui
bool liveplaygui
Definition gx_system.h:431
gx_system::CmdlineOptions::get_nogui
bool get_nogui() const
Definition gx_system.h:519
gx_system::CmdlineOptions::get_xrun_watchdog
bool get_xrun_watchdog() const
Definition gx_system.h:553
gx_system::CmdlineOptions::get_rpcaddress
const Glib::ustring & get_rpcaddress()
Definition gx_system.h:533
gx_system::CmdlineOptions::get_online_presets_filename
std::string get_online_presets_filename() const
Definition gx_system.h:516
gx_system::CmdlineOptions::rcset
Glib::ustring rcset
Definition gx_system.h:426
gx_system::CmdlineOptions::get_jack_uuid2
const Glib::ustring & get_jack_uuid2() const
Definition gx_system.h:539
gx_system::CmdlineOptions::set_jack_noconnect
void set_jack_noconnect(bool set)
Definition gx_system.h:545
gx_system::CmdlineOptions::system_show_toolbar
bool system_show_toolbar
Definition gx_system.h:471
gx_system::CmdlineOptions::system_tuner_midiout
bool system_tuner_midiout
Definition gx_system.h:474
gx_system::CmdlineOptions::dump_parameter
bool dump_parameter
Definition gx_system.h:451
gx_system::CmdlineOptions::set_rpcaddress
void set_rpcaddress(const Glib::ustring &address)
Definition gx_system.h:534
gx_system::CmdlineOptions::get_pluginpreset_dir
const std::string & get_pluginpreset_dir() const
Definition gx_system.h:500
gx_system::CmdlineOptions::idle_thread_timeout
int idle_thread_timeout
Definition gx_system.h:440
gx_system::CmdlineOptions::jack_uuid
Glib::ustring jack_uuid
Definition gx_system.h:410
gx_system::CmdlineOptions::watchdog_warning
bool watchdog_warning
Definition gx_system.h:442
gx_system::CmdlineOptions::mainwin_x
int mainwin_x
Definition gx_system.h:459
gx_system::CmdlineOptions::get_idle_thread_timeout
int get_idle_thread_timeout() const
Definition gx_system.h:551
gx_system::CmdlineOptions::jack_instance
Glib::ustring jack_instance
Definition gx_system.h:408
gx_system::CmdlineOptions::get_jack_single
bool get_jack_single() const
Definition gx_system.h:544
gx_system::CmdlineOptions::get_pixmap_filepath
std::string get_pixmap_filepath(const std::string &basename) const
Definition gx_system.h:488
gx_system::CmdlineOptions::get_convolver_watchdog
bool get_convolver_watchdog() const
Definition gx_system.h:554
gx_system::CmdlineOptions::jack_single
bool jack_single
Definition gx_system.h:413
gx_system::CmdlineOptions::a_save
bool a_save
Definition gx_system.h:445
gx_system::CmdlineOptions::get_current_style_cssfile
std::string get_current_style_cssfile() const
Definition gx_system.h:487
gx_system::CmdlineOptions::mainwin_visible
int mainwin_visible
Definition gx_system.h:458
gx_system::CmdlineOptions::set_jack_single
void set_jack_single(bool set)
Definition gx_system.h:546
gx_system::CmdlineOptions::get_style_filepath
std::string get_style_filepath(const std::string &basename) const
Definition gx_system.h:486
gx_system::CmdlineOptions::onlygui
bool onlygui
Definition gx_system.h:430
gx_system::CmdlineOptions::process
void process(int argc, char **argv)
gx_system::CmdlineOptions::get_path_to_program
const std::string & get_path_to_program() const
Definition gx_system.h:485
gx_system::CmdlineOptions::tuner_tet
Glib::ustring tuner_tet
Definition gx_system.h:437
gx_system::CmdlineOptions::hideonquit
bool hideonquit
Definition gx_system.h:432
gx_system::CmdlineOptions::get_style_dir
const std::string & get_style_dir() const
Definition gx_system.h:513
gx_system::CmdlineOptions::get_old_user_dir
const std::string & get_old_user_dir() const
Definition gx_system.h:497
gx_system::CmdlineOptions::convolver_watchdog
bool convolver_watchdog
Definition gx_system.h:441
gx_system::CmdlineOptions::auto_save
bool auto_save
Definition gx_system.h:446
gx_system::CmdlineOptions::loop_dir
std::string loop_dir
Definition gx_system.h:425
gx_system::CmdlineOptions::set_loop_dir
void set_loop_dir(std::string dir)
Definition gx_system.h:509
gx_system::CmdlineOptions::system_show_presets
bool system_show_presets
Definition gx_system.h:470
gx_system::CmdlineOptions::load_file
std::string load_file
Definition gx_system.h:415
gx_system::CmdlineOptions::jack_noconnect
bool jack_noconnect
Definition gx_system.h:412
gx_system::CmdlineOptions::get_loadfile
const std::string & get_loadfile() const
Definition gx_system.h:535
gx_system::CmdlineOptions::get_factory_filepath
std::string get_factory_filepath(const std::string &basename) const
Definition gx_system.h:491
gx_system::CmdlineOptions::pluginpreset_dir
std::string pluginpreset_dir
Definition gx_system.h:421
gx_system::CmdlineOptions::lv2_preset_dir
std::string lv2_preset_dir
Definition gx_system.h:422
gx_system::CmdlineOptions::mainwin_y
int mainwin_y
Definition gx_system.h:460
gx_system::CmdlineOptions::pixmap_dir
std::string pixmap_dir
Definition gx_system.h:418
gx_system::CmdlineOptions::get_jack_servername
const Glib::ustring & get_jack_servername() const
Definition gx_system.h:542
gx_system::CmdlineOptions::jack_uuid2
Glib::ustring jack_uuid2
Definition gx_system.h:411
gx_system::CmdlineOptions::mul_buffer
int mul_buffer
Definition gx_system.h:464
gx_system::CmdlineOptions::get_jack_noconnect
bool get_jack_noconnect() const
Definition gx_system.h:543
gx_system::CmdlineOptions::get_jack_midi
const Glib::ustring & get_jack_midi() const
Definition gx_system.h:540
gx_system::CmdlineOptions::setbank
Glib::ustring setbank
Definition gx_system.h:434
gx_system::CmdlineOptions::xrun_watchdog
bool xrun_watchdog
Definition gx_system.h:443
gx_system::CmdlineOptions::cmdline_bank
Glib::ustring cmdline_bank
Definition gx_system.h:435
gx_system::FileName::FileName
FileName(const std::string &filename_, const Glib::ustring &displayname_)
Definition gx_system.h:337
gx_system::FileName::filename
std::string filename
Definition gx_system.h:335
gx_system::FileName::displayname
Glib::ustring displayname
Definition gx_system.h:336
gx_system::IRFileListing::~IRFileListing
~IRFileListing()
Definition gx_system.h:347
gx_system::IRFileListing::IRFileListing
IRFileListing(const std::string &path)
gx_system::IRFileListing::get_listing
std::vector< FileName > & get_listing()
Definition gx_system.h:348
gx_system::IRFileListing::listing
std::vector< FileName > listing
Definition gx_system.h:344
gx_system::MeasureThreadsafe
Definition gx_system.h:198
gx_system::MeasureThreadsafe::ts_diff
int ts_diff(const timespec &ts1, const timespec &ts2)
Definition gx_system.h:232
gx_system::MeasureThreadsafe::t1old
timespec t1old
Definition gx_system.h:205
gx_system::MeasureThreadsafe::start
void start()
Definition gx_system.h:212
gx_system::MeasureThreadsafe::t2s
timespec t2s
Definition gx_system.h:204
gx_system::MeasureThreadsafe::t1s
timespec t1s
Definition gx_system.h:202
gx_system::MeasureThreadsafe::m
Measure m[2]
Definition gx_system.h:200
gx_system::MeasureThreadsafe::print
void print(bool verbose=false)
gx_system::MeasureThreadsafe::t1e
timespec t1e
Definition gx_system.h:203
gx_system::MeasureThreadsafe::stop
void stop()
Definition gx_system.h:241
gx_system::MeasureThreadsafe::MeasureThreadsafe
MeasureThreadsafe()
gx_system::MeasureThreadsafe::FPUStatus
unsigned int FPUStatus
Definition gx_system.h:206
gx_system::MeasureThreadsafe::access
Measure * access()
Definition gx_system.h:208
gx_system::MeasureThreadsafe::MXStatus
unsigned int MXStatus
Definition gx_system.h:207
gx_system::MeasureThreadsafe::pause
void pause()
Definition gx_system.h:217
gx_system::MeasureThreadsafe::cont
void cont()
Definition gx_system.h:222
gx_system::MeasureThreadsafe::pmeasure
Measure * pmeasure
Definition gx_system.h:201
gx_system::PathList
Definition gx_system.h:294
gx_system::PathList::find_dir
bool find_dir(std::string *d, const std::string &filename) const
gx_system::PathList::begin
iterator begin()
Definition gx_system.h:306
gx_system::PathList::PathList
PathList(const char *env_name=0)
gx_system::PathList::iterator
std::list< Glib::RefPtr< Gio::File > >::const_iterator iterator
Definition gx_system.h:297
gx_system::PathList::pathlist
std::list< Glib::RefPtr< Gio::File > > pathlist
Definition gx_system.h:296
gx_system::PathList::end
iterator end()
Definition gx_system.h:307
gx_system::PathList::contains
bool contains(const std::string &d) const
gx_system::PathList::size
size_t size()
Definition gx_system.h:305
gx_system::PathList::dirs
pathlist dirs
Definition gx_system.h:299
gx_system::PathList::add
void add(const std::string &d)
Definition gx_system.h:302
gx_system::PrefixConverter
Definition gx_system.h:313
gx_system::PrefixConverter::replace_symbol
std::string replace_symbol(const std::string &dir) const
gx_system::PrefixConverter::add
void add(char s, const std::string &d)
gx_system::PrefixConverter::~PrefixConverter
~PrefixConverter()
Definition gx_system.h:320
gx_system::PrefixConverter::replace_path
std::string replace_path(const std::string &dir) const
gx_system::PrefixConverter::get_symbol_path_map
const symbol_path_map & get_symbol_path_map()
Definition gx_system.h:325
gx_system::PrefixConverter::dirs
symbol_path_map dirs
Definition gx_system.h:317
gx_system::PrefixConverter::symbol_path_map
std::map< char, std::string > symbol_path_map
Definition gx_system.h:315
gx_system::PrefixConverter::PrefixConverter
PrefixConverter()
Definition gx_system.h:319
gx_system::PrefixConverter::replace
void replace(char s, const std::string &d)
gx_system::SkinHandling
Definition gx_system.h:278
gx_system::SkinHandling::operator[]
const Glib::ustring & operator[](unsigned int idx)
gx_system::SkinHandling::skin_list
std::vector< Glib::ustring > skin_list
Definition gx_system.h:281
gx_system::SkinHandling::SkinHandling
SkinHandling(const std::string &styledir)
Definition gx_system.h:282
gx_system::SkinHandling::is_in_list
bool is_in_list(const std::string &skin_name)
gx_system::SkinHandling::set_styledir
void set_styledir(const std::string &styledir)
gx_system::SkinHandling::get_cssfile
string get_cssfile() const
gx_system::SkinHandling::set_default_skin_name
void set_default_skin_name()
gx_system::SkinHandling::index
unsigned int index(const Glib::ustring &skin_name)
gx_system::SkinHandling::name
Glib::ustring name
Definition gx_system.h:280
_MM_GET_EXCEPTION_STATE
unsigned int _MM_GET_EXCEPTION_STATE(void)
Definition gx_system.h:71
clear_fpu_status_bits
void clear_fpu_status_bits()
Definition gx_system.h:40
AVOIDDENORMALS
void AVOIDDENORMALS()
Definition gx_system.h:73
_MM_SET_EXCEPTION_STATE
void _MM_SET_EXCEPTION_STATE(unsigned int __mask)
Definition gx_system.h:70
get_fpu_status_bits
unsigned int get_fpu_status_bits()
Definition gx_system.h:41
gx_system
Definition gx_json.h:33
gx_system::measure_pause
void measure_pause()
Definition gx_system.h:263
gx_system::get_options
BasicOptions & get_options()
Definition gx_system.h:558
gx_system::measure_stop
void measure_stop()
Definition gx_system.h:265
gx_system::encode_filename
std::string encode_filename(const std::string &s)
gx_system::atomic_get
int atomic_get(volatile int &p)
Definition gx_system.h:98
gx_system::atomic_set
void atomic_set(volatile int *p, int v)
Definition gx_system.h:90
gx_system::gx_system_call
int gx_system_call(const std::string &, bool devnull=false, bool escape=false)
gx_system::measure_start
void measure_start()
Definition gx_system.h:262
gx_system::measure_cont
void measure_cont()
Definition gx_system.h:264
gx_system::atomic_inc
void atomic_inc(volatile int *p)
Definition gx_system.h:106
gx_system::add_time_measurement
void add_time_measurement()
gx_system::decode_filename
std::string decode_filename(const std::string &s)
gx_system::atomic_compare_and_exchange
bool atomic_compare_and_exchange(volatile int *p, int oldv, int newv)
Definition gx_system.h:114
gx_system::measure
MeasureThreadsafe measure
gx_system::atomic_set_0
void atomic_set_0(T **p)
Definition gx_system.h:128
gx_system::to_string
std::string to_string(const T &t)
Definition gx_system.h:572
gx_system::strip
void strip(Glib::ustring &s)
gx_system::list_subdirs
void list_subdirs(PathList pl, std::vector< FileName > &dirs)
gx_system::Measure
Definition gx_system.h:182
gx_system::Measure::reset
void reset()
gx_system::Measure::MXStatus1
unsigned int MXStatus1
Definition gx_system.h:188
gx_system::Measure::Measure
Measure()
Definition gx_system.h:193
gx_system::Measure::duration1
Accum duration1
Definition gx_system.h:185
gx_system::Measure::print
void print(bool verbose) const
gx_system::Measure::period
Accum period
Definition gx_system.h:183
gx_system::Measure::duration
Accum duration
Definition gx_system.h:184
gx_system::Measure::MXStatus2
unsigned int MXStatus2
Definition gx_system.h:190
gx_system::Measure::print_accum
void print_accum(const Accum &accum, const char *prefix, bool verbose, int total=0) const
gx_system::Measure::FPUStatus2
unsigned int FPUStatus2
Definition gx_system.h:189
gx_system::Measure::FPUStatus1
unsigned int FPUStatus1
Definition gx_system.h:187
gx_system::Measure::duration2
Accum duration2
Definition gx_system.h:186
gx_system::Measure::ns2ms
float ns2ms(int n) const
Definition gx_system.h:191