Now I get:
use of undeclared identifier 'prefixLength' column: 52, line: 6
use of undeclared identifier 'prefixLength' column: 47, line: 12
no member named 'floatHook' in 'BelaInitSettings' column: 19, line: 25
with this cpp:
`
#include <Bela.h>
#include <libraries/BelaLibpd/BelaLibpd.h>
int Bela_floatHook(const char *source, float value)
{ //lineout
if(strncmp(source, "bela_setLineOutLevel", prefixLength) == 0)
{
Bela_setLineOutLevel(-1, value); // -1 means: apply to all channels
return 0;
}
//headphones
if(strncmp(source, "bela_setHpLevel", prefixLength) == 0)
{
Bela_setHpLevel(-1, value);
return 0;
}
return 1;
}
void Bela_userSettings(BelaInitSettings *settings)
{
settings->uniformSampleRate = 1;
settings->interleave = 0;
settings->analogOutputsPersist = 0;
settings->floatHook = Bela_floatHook;
}
bool setup(BelaContext *context, void *userData)
{
bool success = BelaLibpd_setup(context, userData, {});
if(!success)
return false;
libpd_bind("bela_setLineOutLevel");
libpd_bind("bela_setHpOutLevel");
return true;
}
void render(BelaContext *context, void *userData)
{
BelaLibpd_render(context, userData);
}
void cleanup(BelaContext *context, void *userData)
{
BelaLibpd_cleanup(context, userData);
}
`
Regarding the pixelbone branch I will start a new discussion.