Change the sointu.h api to return -1, 0 or n>0 depending if buffer is full and/or row ended.

test_render_samples_api.c was added to test the api. bridge.go was modified to reflect that there is no need to check for row manually; su_render_samples already returns the information if a row has ended.
This commit is contained in:
Veikko Sariola
2020-10-24 13:00:08 +03:00
parent c9e8000c5f
commit 6e85ff674a
7 changed files with 158 additions and 38 deletions

View File

@ -34,7 +34,7 @@ void CALLCONV su_render(float* buffer) {
memcpy(synthState->Commands, commands, sizeof(commands));
memcpy(synthState->Values, values, sizeof(values));
synthState->RandSeed = 1;
synthState->RowLen = INT32_MAX;
synthState->SamplesPerRow = INT32_MAX;
synthState->NumVoices = 1;
synthState->Synth.Voices[0].Note = 64;
retval = su_render_samples(synthState, su_max_samples / 2, buffer);