#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 2 /* The vocoder only supports 1 or 2 channels. */
staticma_audio_buffer_refg_sourceData;/* The underlying data source of the source node. */
staticma_waveformg_exciteData;/* The underlying data source of the excite 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. */
* Call this function continuously to generate your output.
* carrier_buffer and modulator_buffer should contain the carrier and modulator signals respectively.
* The modulator must always have one channel.
* If the carrier has two channels, the samples in carrier_buffer must be interleaved.
* output_buffer will be filled with the result, and must be able to hold as many channels as the carrier.
* If the carrier has two channels, the output buffer will be filled with interleaved samples.
* output_buffer may be the same pointer as either carrier_buffer or modulator_buffer as long as it can hold the same number of channels as the carrier.
* The processing is performed in place.
* frames specifies the number of sample frames that should be processed.
* Returns nonzero (true) on success or 0 (false) on failure.
* The function will only fail if one or more of the parameters are invalid.
/* The main instance structure. This is the structure that you will create an instance of when using the vocoder. */
structvoclib_instance
{
voclib_bandanalysis_bands[VOCLIB_MAX_BANDS];/* The filterbank used for analysis (these are applied to the modulator). */
voclib_envelopeanalysis_envelopes[VOCLIB_MAX_BANDS];/* The envelopes used to smooth the analysis bands. */
voclib_bandsynthesis_bands[VOCLIB_MAX_BANDS*2];/* The filterbank used for synthesis (these are applied to the carrier). The second half of the array is only used for stereo carriers. */
floatreaction_time;/* In seconds. Higher values make the vocoder respond more slowly to changes in the modulator. */
floatformant_shift;/* In octaves. 1.0 is unchanged. */