In the Daisy Seed examples I encountered things like:
#include "daisy_seed.h"
#include "daisysp.h"
// Use the daisy namespace to prevent having to type
// daisy:: before all libdaisy functions
using namespace daisy;
using namespace daisysp;
1: What do I need to replace them with to be able to get things compiled in the arduino ide?
2: There seems to be a big difference in the definition of the buffers.
If I do not use the arduino ide, I can use
static void AudioCallback(float *in, float *out, size_t size)
as in
static void AudioCallback(float *in, float *out, size_t size)
{
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf += 2)
{
x[0] = in[index_2_buf]; // This is the left channel.
y[0] = in[index_2_buf + 1]; // This is the right channel
But if I use the IDE then I need to use:
static void AudioCallback(float **in, float **out, size_t size)
But then addressing the buffer like this:
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf+= num_channels)
{
x[0] = in[0][index_2_buf]; // Should be left channel.
y[0] = in[0][index_2_buf + size]; // should be right channel
does not give me the left and right channel samples.
What am I missing?