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