6#include "zrythm-config.h"
10#include "engine/session/recording_manager.h"
11#include "gui/backend/backend/file_manager.h"
12#include "gui/backend/backend/project.h"
13#include "gui/backend/backend/settings/chord_preset_pack_manager.h"
15#include "gui/backend/plugin_manager.h"
16#include "utils/dsp_context.h"
17#include "utils/monotonic_time_provider.h"
18#include "utils/networking.h"
21#include "juce_wrapper.h"
29#define MAX_RECENT_PROJECTS 20
30#define DEBUGGING (Q_UNLIKELY (gZrythm && gZrythm->debug_))
31#define ZRYTHM_BENCHMARKING (gZrythm && gZrythm->benchmarking_)
32#define ZRYTHM_GENERATING_PROJECT (gZrythm->generating_project_)
33#define ZRYTHM_HAVE_UI (gZrythm && gZrythm->have_ui_)
34#define ZRYTHM_BREAK_ON_ERROR (gZrythm && gZrythm->break_on_error_)
36#define ZRYTHM_USE_OPTIMIZED_DSP (Q_LIKELY (gZrythm->use_optimized_dsp_))
49 getPluginManager CONSTANT FINAL)
50 Q_PROPERTY (QString version READ getVersion CONSTANT FINAL)
64 pre_init (std::optional<fs::path> exe_path,
bool have_ui,
bool optimized_dsp);
73 QString getVersion ()
const {
return get_version (
false).to_qstring (); }
96 networking::URL::GetContentsAsyncCallback callback);
215 std::unique_ptr<zrythm::gui::old_dsp::plugins::PluginManager>
plugin_manager_;
241 JUCE_DECLARE_SINGLETON_SINGLETHREADED (Zrythm,
false)
243 JUCE_HEAVYWEIGHT_LEAK_DETECTOR (Zrythm)
246#define gZrythm (Zrythm::getInstanceWithoutCreating ())
Manages the file browser functionality, including loading files, setting the current selection,...
A string interner (Symbol Map).
To be used throughout the program.
void init_user_dirs_and_files()
Initializes/creates the default dirs/files in the user directory.
fs::path exe_path_
argv[0].
fs::path open_filename_
Filename to open passed through the command line.
FileManager file_manager_
File manager.
bool have_ui_
1 if Zrythm has a UI, 0 if headless (eg, when unit-testing).
bool generating_project_
Whether this is a dummy instance used when generating projects.
std::unique_ptr< Project > project_
Project data.
bool break_on_error_
Whether to abort() on an error log message.
bool creating_project_
Whether creating a new project, either from a template or blank.
void pre_init(std::optional< fs::path > exe_path, bool have_ui, bool optimized_dsp)
Called before init().
static void get_version_with_capabilities(char *buf, bool include_system_info)
Returns the version and the capabilities.
std::unique_ptr< Settings > settings_
Application settings.
bool debug_
In debug mode or not (determined by GSetting).
bool use_optimized_dsp_
Whether to use optimized DSP when available.
bool benchmarking_
Whether currently running under the benchmarker.
static void fetch_latest_release_ver_async(networking::URL::GetContentsAsyncCallback callback)
bool use_pipewire_in_tests_
Whether to use pipewire in tests.
bool opening_template_
Whether the open file is a template to be used to create a new project from.
Symap symap_
String interner for internal things.
bool open_newer_backup_
Whether to open a newer backup if found.
fs::path create_project_path_
Path to create a project in, including its title.
std::unique_ptr< zrythm::gui::old_dsp::plugins::PluginManager > plugin_manager_
Manages plugins (loading, instantiating, etc.).
static utils::Utf8String get_system_info()
Returns system info (mainly used for bug reports).
static bool is_latest_release(const char *remote_latest_release)
Returns whether the given release string is the latest release.
engine::session::RecordingManager * recording_manager_
Recording manager.
ProcessId pipewire_pid_
Process ID for pipewire (used in tests).
std::unique_ptr< ChordPresetPackManager > chord_preset_pack_manager_
Chord preset pack manager.
int undo_stack_len_
Undo stack length, used during tests.
static utils::Utf8String get_version(bool with_v)
Returns the version string.
std::unique_ptr< DspContextRAII > lsp_dsp_context_
LSP DSP context for the main thread.
static bool is_release(bool official)
Returns whether the current Zrythm version is a release version.
Handles the recording logic for the application.
The PluginManager is responsible for scanning and keeping track of available Plugin's.
Lightweight UTF-8 string wrapper with safe conversions.
qint64 ProcessId
GPid equivalent.
API for Symap, a basic symbol map (string interner).