8#include "engine/session/recording_manager.h"
9#include "gui/backend/backend/settings/chord_preset_pack_manager.h"
11#include "gui/backend/plugin_manager.h"
12#include "utils/dsp_context.h"
13#include "utils/monotonic_time_provider.h"
14#include "utils/networking.h"
17#include "juce_wrapper.h"
25#define MAX_RECENT_PROJECTS 20
26#define DEBUGGING (Q_UNLIKELY (gZrythm && gZrythm->debug_))
27#define ZRYTHM_BENCHMARKING (gZrythm && gZrythm->benchmarking_)
28#define ZRYTHM_GENERATING_PROJECT (gZrythm->generating_project_)
29#define ZRYTHM_HAVE_UI (gZrythm && gZrythm->have_ui_)
30#define ZRYTHM_BREAK_ON_ERROR (gZrythm && gZrythm->break_on_error_)
32#define ZRYTHM_USE_OPTIMIZED_DSP (Q_LIKELY (gZrythm->use_optimized_dsp_))
43 Q_PROPERTY (QString version READ getVersion CONSTANT FINAL)
57 pre_init (std::optional<fs::path> exe_path,
bool have_ui,
bool optimized_dsp);
61 QString getVersion ()
const {
return get_version (
false).to_qstring (); }
84 networking::URL::GetContentsAsyncCallback callback);
206 JUCE_DECLARE_SINGLETON_SINGLETHREADED (Zrythm,
false)
208 JUCE_HEAVYWEIGHT_LEAK_DETECTOR (Zrythm)
211#define gZrythm (Zrythm::getInstanceWithoutCreating ())
A string interner (Symbol Map).
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.
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.
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.
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.
Lightweight UTF-8 string wrapper with safe conversions.
qint64 ProcessId
GPid equivalent.
API for Symap, a basic symbol map (string interner).