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. */