Zrythm
a highly automated and intuitive digital audio workstation
|
To be used throughout the program. More...
#include <zrythm.h>
Public Member Functions | |
Zrythm (const char *exe_path, bool have_ui, bool optimized_dsp) | |
void | init () |
void | add_to_recent_projects (const char *filepath) |
void | remove_recent_project (char *filepath) |
bool | init_user_dirs_and_files (GError **error) |
Initializes/creates the default dirs/files in the user directory. | |
void | init_templates () |
Initializes the array of project templates. | |
Static Public Member Functions | |
static char * | get_version (bool with_v) |
Returns the version string. | |
static bool | is_release (bool official) |
Returns whether the current Zrythm version is a release version. | |
static char * | fetch_latest_release_ver_finish (GAsyncResult *result, GError **error) |
static void | fetch_latest_release_ver_async (GAsyncReadyCallback callback, gpointer callback_data) |
static bool | is_latest_release (const char *remote_latest_release) |
Returns whether the given release string is the latest release. | |
static void | get_version_with_capabilities (char *buf, bool include_system_info) |
Returns the version and the capabilities. | |
static char * | get_system_info () |
Returns system info (mainly used for bug reports). | |
static char * | get_prefix () |
Returns the prefix or in the case of windows the root dir (C/program files/zrythm) or in the case of macos the bundle path. | |
Data Fields | |
const char * | exe_path_ = nullptr |
argv[0]. | |
PluginManager * | plugin_manager = nullptr |
Manages plugins (loading, instantiating, etc.) | |
std::unique_ptr< Settings > | settings |
Application settings. | |
Project * | project = nullptr |
Project data. | |
std::unique_ptr< StringArray > | recent_projects_ |
+1 to ensure last element is NULL in case full. | |
char ** | templates = nullptr |
NULL terminated array of project template absolute paths. | |
char * | demo_template = nullptr |
Demo project template used when running for the first time. | |
bool | opening_template = false |
Whether the open file is a template to be used to create a new project from. | |
bool | creating_project = false |
Whether creating a new project, either from a template or blank. | |
char * | create_project_path = nullptr |
Path to create a project in, including its title. | |
char * | open_filename = nullptr |
Filename to open passed through the command line. | |
EventManager * | event_manager = nullptr |
RecordingManager * | recording_manager = nullptr |
Recording manager. | |
FileManager * | file_manager = nullptr |
File manager. | |
ChordPresetPackManager * | chord_preset_pack_manager = nullptr |
Chord preset pack manager. | |
std::unique_ptr< ZrythmDirectoryManager > | dir_mgr |
Symap * | symap = nullptr |
String interner for internal things. | |
Symap * | error_domain_symap = nullptr |
String interner for error domains. | |
PCGRand * | rand = nullptr |
Random number generator. | |
bool | debug = false |
In debug mode or not (determined by GSetting). | |
bool | generating_project = false |
Whether this is a dummy instance used when generating projects. | |
bool | have_ui_ = false |
1 if Zrythm has a UI, 0 if headless (eg, when unit-testing). | |
bool | use_optimized_dsp = false |
Whether to use optimized DSP when available. | |
CairoCaches * | cairo_caches = nullptr |
int | undo_stack_len = 0 |
Undo stack length, used during tests. | |
char * | version = nullptr |
Cached version (without 'v'). | |
bool | open_newer_backup = false |
Whether to open a newer backup if found. | |
bool | use_pipewire_in_tests = false |
Whether to use pipewire in tests. | |
GPid | pipewire_pid = 0 |
Process ID for pipewire (used in tests). | |
To be used throughout the program.
Everything here should be global and function regardless of the project.
|
explicit |
have_ui | Whether Zrythm is instantiated with a UI (false if headless). |
testing | Whether this is a unit test. |
|
static |
callback | A GAsyncReadyCallback to call when the request is satisfied. |
callback_data | Data to pass to callback . |
|
static |
Returns the prefix or in the case of windows the root dir (C/program files/zrythm) or in the case of macos the bundle path.
In all cases, "share" is expected to be found in this dir.
|
static |
Returns the version string.
Must be g_free()'d.
with_v | Include a starting "v". |
|
static |
Returns the version and the capabilities.
buf | Buffer to write the string to. |
include_system_info | Whether to include additional system info (for bug reports). |
bool Zrythm::init_user_dirs_and_files | ( | GError ** | error | ) |
Initializes/creates the default dirs/files in the user directory.
|
static |
Returns whether the current Zrythm version is a release version.
CairoCaches* Zrythm::cairo_caches = nullptr |
ChordPresetPackManager* Zrythm::chord_preset_pack_manager = nullptr |
char* Zrythm::create_project_path = nullptr |
bool Zrythm::creating_project = false |
bool Zrythm::debug = false |
char* Zrythm::demo_template = nullptr |
Demo project template used when running for the first time.
This is a copy of one of the strings in Zrythm.templates.
std::unique_ptr<ZrythmDirectoryManager> Zrythm::dir_mgr |
Symap* Zrythm::error_domain_symap = nullptr |
EventManager* Zrythm::event_manager = nullptr |
FileManager* Zrythm::file_manager = nullptr |
bool Zrythm::generating_project = false |
bool Zrythm::have_ui_ = false |
char* Zrythm::open_filename = nullptr |
bool Zrythm::open_newer_backup = false |
bool Zrythm::opening_template = false |
GPid Zrythm::pipewire_pid = 0 |
PluginManager* Zrythm::plugin_manager = nullptr |
Project* Zrythm::project = nullptr |
std::unique_ptr<StringArray> Zrythm::recent_projects_ |
RecordingManager* Zrythm::recording_manager = nullptr |
std::unique_ptr<Settings> Zrythm::settings |
Symap* Zrythm::symap = nullptr |
char** Zrythm::templates = nullptr |
int Zrythm::undo_stack_len = 0 |
bool Zrythm::use_optimized_dsp = false |
bool Zrythm::use_pipewire_in_tests = false |
char* Zrythm::version = nullptr |