Introduction
LiquidSFZ is a library to load and replay sample based instruments in .sfz format. If you want to use libquidsfz in your own project, use the LiquidSFZ::Synth class.
A Simple Example
int
main (int argc, char **argv)
{
if (argc != 2)
{
printf ("usage: %s <sfz_filename>\n", argv[0]);
return 1;
}
if (!synth.
load (argv[1]))
{
printf ("%s: failed to load sfz file '%s'\n", argv[0], argv[1]);
return 1;
}
float left_output[1024];
float right_output[1024];
float *output[2] = { left_output, right_output };
for (int i = 0; i < 1024; i++)
printf ("%d %f %f\n", i, left_output[i], right_output[i]);
}