Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
Zrythm Class Referencefinal

To be used throughout the program. More...

#include <src/gui/backend/backend/zrythm.h>

Inheritance diagram for Zrythm:
Collaboration diagram for Zrythm:

Public Member Functions

void pre_init (std::optional< fs::path > exe_path, bool have_ui, bool optimized_dsp)
 Called before init().
void init ()
zrythm::gui::old_dsp::plugins::PluginManagergetPluginManager () const
QString getVersion () const
void init_user_dirs_and_files ()
 Initializes/creates the default dirs/files in the user directory.
FileManagerget_file_manager ()
Public Member Functions inherited from zrythm::utils::QElapsedTimeProvider
MonotonicTime get_monotonic_time_nsecs () const override
MonotonicTime get_monotonic_time_usecs () const override

Static Public Member Functions

static utils::Utf8String 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 void fetch_latest_release_ver_async (networking::URL::GetContentsAsyncCallback callback)
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 utils::Utf8String get_system_info ()
 Returns system info (mainly used for bug reports).

Data Fields

fs::path exe_path_
 argv[0].
std::unique_ptr< Settingssettings_
 Application settings.
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.
fs::path create_project_path_
 Path to create a project in, including its title.
fs::path open_filename_
 Filename to open passed through the command line.
FileManager file_manager_
 File manager.
Symap symap_
 String interner for internal things.
bool debug_ = false
 In debug mode or not (determined by GSetting).
bool break_on_error_ = false
 Whether to abort() on an error log message.
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.
int undo_stack_len_ = 0
 Undo stack length, used during tests.
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.
ProcessId pipewire_pid_ = 0
 Process ID for pipewire (used in tests).
std::unique_ptr< ChordPresetPackManagerchord_preset_pack_manager_
 Chord preset pack manager.
std::unique_ptr< zrythm::gui::old_dsp::plugins::PluginManagerplugin_manager_
 Manages plugins (loading, instantiating, etc.).
engine::session::RecordingManagerrecording_manager_ = nullptr
 Recording manager.
std::unique_ptr< Projectproject_
 Project data.
std::unique_ptr< DspContextRAIIlsp_dsp_context_
 LSP DSP context for the main thread.
bool benchmarking_ = false
 Whether currently running under the benchmarker.

Properties

QML_ELEMENT zrythm::gui::old_dsp::plugins::PluginManagerpluginManager
QString version

Detailed Description

To be used throughout the program.

Everything here should be global and function regardless of the project.

Definition at line 43 of file zrythm.h.

Member Function Documentation

◆ fetch_latest_release_ver_async()

void Zrythm::fetch_latest_release_ver_async ( networking::URL::GetContentsAsyncCallback callback)
static
Parameters
callbackA GAsyncReadyCallback to call when the request is satisfied.
callback_dataData to pass to callback.

◆ get_file_manager()

FileManager & Zrythm::get_file_manager ( )
inline

Definition at line 124 of file zrythm.h.

◆ get_version()

utils::Utf8String Zrythm::get_version ( bool with_v)
static

Returns the version string.

Parameters
with_vInclude a starting "v".

◆ get_version_with_capabilities()

void Zrythm::get_version_with_capabilities ( char * buf,
bool include_system_info )
static

Returns the version and the capabilities.

Parameters
bufBuffer to write the string to.
include_system_infoWhether to include additional system info (for bug reports).

◆ getPluginManager()

zrythm::gui::old_dsp::plugins::PluginManager * Zrythm::getPluginManager ( ) const
inline

Definition at line 66 of file zrythm.h.

◆ getVersion()

QString Zrythm::getVersion ( ) const
inline

Definition at line 71 of file zrythm.h.

◆ init_user_dirs_and_files()

void Zrythm::init_user_dirs_and_files ( )

Initializes/creates the default dirs/files in the user directory.

Exceptions
ZrythmExceptionIf an error occured.

◆ is_release()

bool Zrythm::is_release ( bool official)
static

Returns whether the current Zrythm version is a release version.

Note
This only does regex checking.

◆ pre_init()

void Zrythm::pre_init ( std::optional< fs::path > exe_path,
bool have_ui,
bool optimized_dsp )

Called before init().

TODO: check if can be merged into init().

Parameters
have_uiWhether Zrythm is instantiated with a UI (false if headless).
testingWhether this is a unit test.

Field Documentation

◆ benchmarking_

bool Zrythm::benchmarking_ = false

Whether currently running under the benchmarker.

Definition at line 237 of file zrythm.h.

◆ break_on_error_

bool Zrythm::break_on_error_ = false

Whether to abort() on an error log message.

Definition at line 169 of file zrythm.h.

◆ chord_preset_pack_manager_

std::unique_ptr<ChordPresetPackManager> Zrythm::chord_preset_pack_manager_

Chord preset pack manager.

Definition at line 206 of file zrythm.h.

◆ create_project_path_

fs::path Zrythm::create_project_path_

Path to create a project in, including its title.

Definition at line 146 of file zrythm.h.

◆ creating_project_

bool Zrythm::creating_project_ = false

Whether creating a new project, either from a template or blank.

Definition at line 143 of file zrythm.h.

◆ debug_

bool Zrythm::debug_ = false

In debug mode or not (determined by GSetting).

Definition at line 166 of file zrythm.h.

◆ exe_path_

fs::path Zrythm::exe_path_

argv[0].

Definition at line 131 of file zrythm.h.

◆ file_manager_

FileManager Zrythm::file_manager_

File manager.

Definition at line 156 of file zrythm.h.

◆ generating_project_

bool Zrythm::generating_project_ = false

Whether this is a dummy instance used when generating projects.

Definition at line 173 of file zrythm.h.

◆ have_ui_

bool Zrythm::have_ui_ = false

1 if Zrythm has a UI, 0 if headless (eg, when unit-testing).

Definition at line 177 of file zrythm.h.

◆ lsp_dsp_context_

std::unique_ptr<DspContextRAII> Zrythm::lsp_dsp_context_

LSP DSP context for the main thread.

Definition at line 232 of file zrythm.h.

◆ open_filename_

fs::path Zrythm::open_filename_

Filename to open passed through the command line.

Used only when a filename is passed, eg, zrytm myproject.zpj

Definition at line 153 of file zrythm.h.

◆ open_newer_backup_

bool Zrythm::open_newer_backup_ = false

Whether to open a newer backup if found.

This is only used during tests where there is no UI to choose.

Definition at line 190 of file zrythm.h.

◆ opening_template_

bool Zrythm::opening_template_ = false

Whether the open file is a template to be used to create a new project from.

Definition at line 140 of file zrythm.h.

◆ pipewire_pid_

ProcessId Zrythm::pipewire_pid_ = 0

Process ID for pipewire (used in tests).

Definition at line 203 of file zrythm.h.

◆ plugin_manager_

std::unique_ptr<zrythm::gui::old_dsp::plugins::PluginManager> Zrythm::plugin_manager_

Manages plugins (loading, instantiating, etc.).

Definition at line 213 of file zrythm.h.

◆ project_

std::unique_ptr<Project> Zrythm::project_

Project data.

This is what should be exported/imported when saving/loading projects.

The only reason this is a pointer is to easily deserialize.

Should be free'd first, therefore it is the last member.

Definition at line 227 of file zrythm.h.

◆ recording_manager_

engine::session::RecordingManager* Zrythm::recording_manager_ = nullptr

Recording manager.

Definition at line 216 of file zrythm.h.

◆ settings_

std::unique_ptr<Settings> Zrythm::settings_

Application settings.

Definition at line 136 of file zrythm.h.

◆ symap_

Symap Zrythm::symap_

String interner for internal things.

Definition at line 161 of file zrythm.h.

◆ undo_stack_len_

int Zrythm::undo_stack_len_ = 0

Undo stack length, used during tests.

Definition at line 183 of file zrythm.h.

◆ use_optimized_dsp_

bool Zrythm::use_optimized_dsp_ = false

Whether to use optimized DSP when available.

Definition at line 180 of file zrythm.h.

◆ use_pipewire_in_tests_

bool Zrythm::use_pipewire_in_tests_ = false

Whether to use pipewire in tests.

If this is false, the dummy engine will be used.

Some tests do sample rate changes so it's more convenient to use the dummy engine instead.

Definition at line 200 of file zrythm.h.

Property Documentation

◆ pluginManager

QML_ELEMENT zrythm::gui::old_dsp::plugins::PluginManager * Zrythm::pluginManager
read

Definition at line 47 of file zrythm.h.

◆ version

QString Zrythm::version
read

Definition at line 48 of file zrythm.h.


The documentation for this class was generated from the following file: