Improvements to the build system for extra nodes.

With this change, nodes in the extras folder can now be compiled as a
conventional library.
This commit is contained in:
David Reid
2025-02-22 14:25:45 +10:00
parent 1fbad32949
commit 9f10bc7540
16 changed files with 105 additions and 44 deletions
@@ -1,11 +1,15 @@
#ifndef miniaudio_channel_combiner_node_c
#define miniaudio_channel_combiner_node_c
#include "ma_channel_combiner_node.h"
#include <string.h> /* For memset(). */
MA_API ma_channel_combiner_node_config ma_channel_combiner_node_config_init(ma_uint32 channels)
{
ma_channel_combiner_node_config config;
MA_ZERO_OBJECT(&config);
memset(&config, 0, sizeof(config));
config.nodeConfig = ma_node_config_init(); /* Input and output channels will be set in ma_channel_combiner_node_init(). */
config.channels = channels;
@@ -43,7 +47,7 @@ MA_API ma_result ma_channel_combiner_node_init(ma_node_graph* pNodeGraph, const
return MA_INVALID_ARGS;
}
MA_ZERO_OBJECT(pCombinerNode);
memset(pCombinerNode, 0, sizeof(*pCombinerNode));
if (pConfig == NULL) {
return MA_INVALID_ARGS;
@@ -74,4 +78,6 @@ MA_API void ma_channel_combiner_node_uninit(ma_channel_combiner_node* pCombinerN
{
/* The base node is always uninitialized first. */
ma_node_uninit(pCombinerNode, pAllocationCallbacks);
}
}
#endif /* miniaudio_channel_combiner_node_c */
@@ -1,6 +1,8 @@
/* Include ma_channel_combiner_node.h after miniaudio.h */
#ifndef ma_channel_combiner_node_h
#define ma_channel_combiner_node_h
#ifndef miniaudio_channel_combiner_node_h
#define miniaudio_channel_combiner_node_h
#include "../../../miniaudio.h"
#ifdef __cplusplus
extern "C" {
@@ -27,4 +29,4 @@ MA_API void ma_channel_combiner_node_uninit(ma_channel_combiner_node* pSeparator
#ifdef __cplusplus
}
#endif
#endif /* ma_reverb_node_h */
#endif /* miniaudio_channel_combiner_node_h */