enforce coding style guide

using astyle
This commit is contained in:
derselbst 2018-06-24 13:01:31 +02:00
parent 90c2d76709
commit 9382edabd5
129 changed files with 33394 additions and 27137 deletions

View file

@ -10,33 +10,33 @@ int main(void)
{
enum { FRAMES = 1024 };
float buf[FRAMES * 2];
fluid_settings_t *settings = new_fluid_settings();
fluid_synth_t *synth1 = new_fluid_synth(settings),
*synth2 = new_fluid_synth(settings);
*synth2 = new_fluid_synth(settings);
TEST_ASSERT(settings != NULL);
TEST_ASSERT(synth1 != NULL);
TEST_ASSERT(synth2 != NULL);
// load a sfont to synth1
TEST_SUCCESS(fluid_synth_sfload(synth1, TEST_SOUNDFONT, 1));
// load the same font to synth2 and start a note
TEST_SUCCESS(fluid_synth_sfload(synth2, TEST_SOUNDFONT, 1));
TEST_SUCCESS(fluid_synth_noteon(synth2, 0, 60, 127));
// render some audio
TEST_SUCCESS(fluid_synth_write_float(synth2, FRAMES, buf, 0, 2, buf, 1, 2));
// delete the synth that owns the soundfont
delete_fluid_synth(synth1);
// render again with the unloaded sfont and hope no segfault happens
TEST_SUCCESS(fluid_synth_write_float(synth2, FRAMES, buf, 0, 2, buf, 1, 2));
delete_fluid_synth(synth2);
delete_fluid_settings(settings);
return EXIT_SUCCESS;
}