ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
The vocoder node has two inputs and one output. Inputs:
Input Bus 0: The source/carrier stream.
Input Bus 1: The excite/modulator stream.
The source (input bus 0) and output must have the same channel count, and is restricted to 1 or 2.
The excite (input bus 1) is restricted to 1 channel.
*/
typedefstruct
{
ma_node_confignodeConfig;
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
Demonstrates how to apply an effect to a duplex stream using the node graph system.
This example applies a vocoder effect to the input stream before outputting it. A custom node
called `ma_vocoder_node` is used to achieve the effect which can be found in the extras folder in
the miniaudio repository. The vocoder node uses https://github.com/blastbay/voclib to achieve the
effect.
*/
#define MINIAUDIO_IMPLEMENTATION
#include "../../../../miniaudio.h"
#include "../../../miniaudio_engine.h"
#include "ma_vocoder_node.c"
#include <stdio.h>
#define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */
#define DEVICE_CHANNELS 1 /* For this example, always set to 1. */
staticma_waveformg_sourceData;/* The underlying data source of the excite node. */
staticma_audio_buffer_refg_exciteData;/* The underlying data source of the source node. */
staticma_data_source_nodeg_sourceNode;/* A data source node containing the source data we'll be sending through to the vocoder. This will be routed into the first bus of the vocoder node. */
staticma_data_source_nodeg_exciteNode;/* A data source node containing the excite data we'll be sending through to the vocoder. This will be routed into the second bus of the vocoder node. */
staticma_vocoder_nodeg_vocoderNode;/* The vocoder node. */
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
The vocoder node has two inputs and one output. Inputs:
Input Bus 0: The source/carrier stream.
Input Bus 1: The excite/modulator stream.
The source (input bus 0) and output must have the same channel count, and is restricted to 1 or 2.
The excite (input bus 1) is restricted to 1 channel.
*/
typedefstruct
{
ma_node_confignodeConfig;
ma_uint32channels;/* The number of channels of the source, which will be the same as the output. Must be 1 or 2. The excite bus must always have one channel. */
Demonstrates how to apply an effect to a duplex stream using the node graph system.
This example applies a vocoder effect to the input stream before outputting it. A custom node
called `ma_vocoder_node` is used to achieve the effect which can be found in the extras folder in
the miniaudio repository. The vocoder node uses https://github.com/blastbay/voclib to achieve the
effect.
*/
#define MINIAUDIO_IMPLEMENTATION
#include "../../../../miniaudio.h"
#include "../../../miniaudio_engine.h"
#include "ma_vocoder_node.c"
#include <stdio.h>
#define DEVICE_FORMAT ma_format_f32 /* Must always be f32 for this example because the node graph system only works with this. */
#define DEVICE_CHANNELS 1 /* For this example, always set to 1. */
staticma_waveformg_sourceData;/* The underlying data source of the excite node. */
staticma_audio_buffer_refg_exciteData;/* The underlying data source of the source node. */
staticma_data_source_nodeg_sourceNode;/* A data source node containing the source data we'll be sending through to the vocoder. This will be routed into the first bus of the vocoder node. */
staticma_data_source_nodeg_exciteNode;/* A data source node containing the excite data we'll be sending through to the vocoder. This will be routed into the second bus of the vocoder node. */
staticma_vocoder_nodeg_vocoderNode;/* The vocoder node. */