mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
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:
@@ -1,11 +1,15 @@
|
||||
#ifndef miniaudio_channel_separator_node_c
|
||||
#define miniaudio_channel_separator_node_c
|
||||
|
||||
#include "ma_channel_separator_node.h"
|
||||
|
||||
#include <string.h> /* For memset(). */
|
||||
|
||||
MA_API ma_channel_separator_node_config ma_channel_separator_node_config_init(ma_uint32 channels)
|
||||
{
|
||||
ma_channel_separator_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_separator_node_init(). */
|
||||
config.channels = channels;
|
||||
|
||||
@@ -43,7 +47,7 @@ MA_API ma_result ma_channel_separator_node_init(ma_node_graph* pNodeGraph, const
|
||||
return MA_INVALID_ARGS;
|
||||
}
|
||||
|
||||
MA_ZERO_OBJECT(pSeparatorNode);
|
||||
memset(pSeparatorNode, 0, sizeof(*pSeparatorNode));
|
||||
|
||||
if (pConfig == NULL) {
|
||||
return MA_INVALID_ARGS;
|
||||
@@ -79,3 +83,5 @@ MA_API void ma_channel_separator_node_uninit(ma_channel_separator_node* pSeparat
|
||||
/* The base node is always uninitialized first. */
|
||||
ma_node_uninit(pSeparatorNode, pAllocationCallbacks);
|
||||
}
|
||||
|
||||
#endif /* miniaudio_channel_separator_node_c */
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/* Include ma_channel_separator_node.h after miniaudio.h */
|
||||
#ifndef ma_channel_separator_node_h
|
||||
#define ma_channel_separator_node_h
|
||||
#ifndef miniaudio_channel_separator_node_h
|
||||
#define miniaudio_channel_separator_node_h
|
||||
|
||||
#include "../../../miniaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -26,4 +28,4 @@ MA_API void ma_channel_separator_node_uninit(ma_channel_separator_node* pSeparat
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* ma_reverb_node_h */
|
||||
#endif /* miniaudio_channel_separator_node_h */
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#define MINIAUDIO_IMPLEMENTATION
|
||||
#include "../../../miniaudio.h"
|
||||
#include "../../../miniaudio.c"
|
||||
#include "ma_channel_separator_node.c"
|
||||
#include "../ma_channel_combiner_node/ma_channel_combiner_node.c"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user