MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Config.hpp
Go to the documentation of this file.
2
3namespace MayaFlux {
4
5namespace Nodes {
6 struct NodeConfig;
7}
8
9namespace Core {
10 struct GlobalStreamInfo;
11 struct GlobalGraphicsConfig;
12 struct GlobalInputConfig;
13 struct GlobalNetworkConfig;
14}
15
16/**
17 * @brief Checks if the default engine has currently accepted all configurations and initialized all managers
18 * @return True if the engine is ready for processing, false otherwise
19 */
20MAYAFLUX_API bool is_engine_configured();
21
22/**
23@brief Globlal configuration for MayaFlux
24*
25* This namespace contains global configuration settings for MayaFlux, including graph and node configurations.
26* It provides access to settings such as sample rate, buffer size, and number of output channels
27* from the default audio engine.
28*/
29namespace Config {
30
31 MAYAFLUX_API Nodes::NodeConfig& get_node_config();
32
33 /**
34 * @brief Sets the node configuration for the default engine
35 * @param config The NodeConfig to set
36 */
37 MAYAFLUX_API void set_node_config(const Nodes::NodeConfig& config);
38
39 /**
40 * @brief Gets the sample rate from the default engine
41 * @return Current sample rate in Hz
42 */
43 MAYAFLUX_API uint32_t get_sample_rate();
44
45 /**
46 * @brief Gets the buffer size from the default engine
47 * @return Current buffer size in frames
48 */
49 MAYAFLUX_API uint32_t get_buffer_size();
50
51 /**
52 * @brief Gets the number of output channels from the default engine
53 * @return Current number of output channels
54 */
55 MAYAFLUX_API uint32_t get_num_out_channels();
56
57 /**
58 * @brief Gets the stream configuration from the default engine
59 * @return Copy of the GlobalStreamInfo struct
60 */
61 MAYAFLUX_API Core::GlobalStreamInfo& get_global_stream_info();
62
63 /**
64 * @brief Gets the graphics configuration from the default engine
65 * @return Copy of the GlobalGraphicsConfig struct
66 */
67 MAYAFLUX_API Core::GlobalGraphicsConfig& get_global_graphics_config();
68
69 /**
70 * @brief Gets the input configuration from the default engine
71 * @return Copy of the GlobalInputConfig struct
72 */
73 MAYAFLUX_API Core::GlobalInputConfig& get_global_input_config();
74
75 /**
76 * @brief Gets the network configuration from the default engine
77 * @return Copy of the GlobalNetworkConfig struct
78 */
79 MAYAFLUX_API Core::GlobalNetworkConfig& get_global_network_config();
80
81 /**
82 * @brief Sets the minimum severity level for journal entries to be logged
83 * @param severity Minimum severity level (e.g., INFO, WARN, ERROR, TRACE, DEBUG, FATAL)
84 */
85 MAYAFLUX_API void set_journal_severity(Journal::Severity severity);
86
87 /**
88 * @brief Stores journal entries to a file by adding a FileSink to the Archivist
89 * @param file_name Path to the log file
90 */
91 MAYAFLUX_API void store_journal_entries(const std::string& file_name);
92
93 /**
94 * @brief Outputs journal entries to the console by adding a ConsoleSink to the Archivist
95 * NOTE: This records thread safe entries and cannot unsink once called.
96 */
97 MAYAFLUX_API void sink_journal_to_console();
98}
99
100}
Core::GlobalGraphicsConfig & get_global_graphics_config()
Gets the graphics configuration from the default engine.
Definition Config.cpp:26
Nodes::NodeConfig & get_node_config()
Definition Config.cpp:50
Core::GlobalInputConfig & get_global_input_config()
Gets the input configuration from the default engine.
Definition Config.cpp:34
uint32_t get_buffer_size()
Gets the buffer size from the default engine.
Definition Config.cpp:72
void set_node_config(const Nodes::NodeConfig &config)
Sets the node configuration for the default engine.
Definition Config.cpp:55
void store_journal_entries(const std::string &file_name)
Stores journal entries to a file by adding a FileSink to the Archivist.
Definition Config.cpp:95
void set_journal_severity(Journal::Severity severity)
Sets the minimum severity level for journal entries to be logged.
Definition Config.cpp:90
void sink_journal_to_console()
Outputs journal entries to the console by adding a ConsoleSink to the Archivist NOTE: This records th...
Definition Config.cpp:101
uint32_t get_sample_rate()
Gets the sample rate from the default engine.
Definition Config.cpp:63
Core::GlobalStreamInfo & get_global_stream_info()
Gets the stream configuration from the default engine.
Definition Config.cpp:18
uint32_t get_num_out_channels()
Gets the number of output channels from the default engine.
Definition Config.cpp:81
Core::GlobalNetworkConfig & get_global_network_config()
Gets the network configuration from the default engine.
Definition Config.cpp:42
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
@ Core
Core engine, backend, subsystems.
bool is_engine_configured()
Checks if the default engine has currently accepted all configurations and initialized all managers.
Definition Config.cpp:10
Main namespace for the Maya Flux audio engine.
Definition Runtime.cpp:12