I wrote a program I compile using a Makefile and make just by linking the code to libdaisy and DaisySP. In this code I use in[index_to_buf] for the left and in[index_to_buf + 1] for the right channel data, in a way similar to this bypass example:
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf += 2)
{
// Get sample from left channel.
xc = in[index_2_buf];
// Get sample from right channel.
xm = in[index_2_buf + 1];
// Write sample to left output channel.
out[index_2_buf] = xc;
// Write sample to right output channel.
out[index_2_buf + 1] = xm;
}
The compiled program works and the data on the left and right channel output is as expected. However, when I look alt examples for working with an arduino setup, I see
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf++)
{
// Get sample from left channel.
xc = in[0][index_2_buf];
// Get sample from right channel.
xm = in[1][index_2_buf];
// some processing is done here
// Write sample to left output channel.
out[0][index_2_buf] = xc;
// Write sample to right output channel.
out[1][index_2_buf] = xm;
}
The in and out buffers apparently are 2 dimensional here.
The code compiles in the arduino ide, however, the output signal for the latter example is not the same as the former example. As far as I understand the examples it should. Am I missing something?