MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Config.hpp
Go to the documentation of this file.
2#include "MayaFlux/Utils.hpp"
3
4namespace MayaFlux {
5
6namespace Core {
7 struct GlobalStreamInfo;
9}
10
11/**
12 * @brief Checks if the default audio engine is initialized
13 * @return True if the engine is initialized, false otherwise
14 */
15MAYAFLUX_API bool is_engine_initialized();
16
17/**
18@brief Globlal configuration for MayaFlux
19*
20* This namespace contains global configuration settings for MayaFlux, including graph and node configurations.
21* It provides access to settings such as sample rate, buffer size, and number of output channels
22* from the default audio engine.
23*/
24namespace Config {
25
26 /**
27 * @brief Configuration settings for the audio graph
28 */
35
36 /**
37 * @brief Configuration settings for individual audio nodes
38 */
39 struct NodeConfig {
40 size_t channel_cache_size = 256; ///< Number of cached channels for oprations
41 uint32_t max_channels = 32; ///< Maximum number of channels supported (uint32_t bits)
44 };
45
48
49 MAYAFLUX_API GraphConfig& get_graph_config();
50 MAYAFLUX_API NodeConfig& get_node_config();
51
52 /**
53 * @brief Gets the sample rate from the default engine
54 * @return Current sample rate in Hz
55 */
56 MAYAFLUX_API uint32_t get_sample_rate();
57
58 /**
59 * @brief Gets the buffer size from the default engine
60 * @return Current buffer size in frames
61 */
62 MAYAFLUX_API uint32_t get_buffer_size();
63
64 /**
65 * @brief Gets the number of output channels from the default engine
66 * @return Current number of output channels
67 */
68 MAYAFLUX_API uint32_t get_num_out_channels();
69
70 /**
71 * @brief Gets the stream configuration from the default engine
72 * @return Copy of the GlobalStreamInfo struct
73 */
75
76 /**
77 * @brief Gets the graphics configuration from the default engine
78 * @return Copy of the GlobalGraphicsConfig struct
79 */
81
82 /**
83 * @brief Sets the minimum severity level for journal entries to be logged
84 * @param severity Minimum severity level (e.g., INFO, WARN, ERROR, TRACE, DEBUG, FATAL)
85 */
86 MAYAFLUX_API void set_journal_severity(Journal::Severity severity);
87
88 /**
89 * @brief Stores journal entries to a file by adding a FileSink to the Archivist
90 * @param file_name Path to the log file
91 */
92 MAYAFLUX_API void store_journal_entries(const std::string& file_name);
93
94 /**
95 * @brief Outputs journal entries to the console by adding a ConsoleSink to the Archivist
96 * NOTE: This records thread safe entries and cannot unsink once called.
97 */
98 MAYAFLUX_API void sink_journal_to_console();
99}
100
101}
Core::GlobalGraphicsConfig & get_global_graphics_config()
Gets the graphics configuration from the default engine.
Definition Config.cpp:34
NodeConfig node_config
Definition Config.cpp:18
uint32_t get_buffer_size()
Gets the buffer size from the default engine.
Definition Config.cpp:51
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:66
void set_journal_severity(Journal::Severity severity)
Sets the minimum severity level for journal entries to be logged.
Definition Config.cpp:61
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:72
GraphConfig & get_graph_config()
Definition Config.cpp:42
GraphConfig graph_config
Definition Config.cpp:17
uint32_t get_sample_rate()
Gets the sample rate from the default engine.
Definition Config.cpp:46
Core::GlobalStreamInfo & get_global_stream_info()
Gets the stream configuration from the default engine.
Definition Config.cpp:26
NodeConfig & get_node_config()
Definition Config.cpp:44
uint32_t get_num_out_channels()
Gets the number of output channels from the default engine.
Definition Config.cpp:56
NodeChainSemantics
Defines how to handle existing nodes when creating a new chain.
Definition Utils.hpp:45
bool is_engine_initialized()
Checks if the default audio engine is initialized.
Definition Config.cpp:9
Main namespace for the Maya Flux audio engine.
Definition LiveAid.hpp:6
Utils::NodeBinaryOpSemantics binary_op_semantics
Definition Config.hpp:31
Utils::NodeChainSemantics chain_semantics
Definition Config.hpp:30
Configuration settings for the audio graph.
Definition Config.hpp:29
size_t channel_cache_size
Number of cached channels for oprations.
Definition Config.hpp:40
uint32_t max_channels
Maximum number of channels supported (uint32_t bits)
Definition Config.hpp:41
Configuration settings for individual audio nodes.
Definition Config.hpp:39
Comprehensive configuration for digital audio stream processing.