mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-21 03:11:13 +00:00
update doc for fluidsynth_register_adriver.c demo
This commit is contained in:
parent
e0d0acc946
commit
9868860318
1 changed files with 11 additions and 1 deletions
|
@ -21,7 +21,11 @@ int main()
|
|||
for(int i=0; i<sizeof(DRV)/sizeof(DRV[0]); i++)
|
||||
{
|
||||
adrivers[0] = DRV[i];
|
||||
adrivers[1] = NULL;
|
||||
/* register any other driver you need
|
||||
*
|
||||
* adrivers[X] = "whatever";
|
||||
*/
|
||||
adrivers[1] = NULL; /* NULL terminate the array */
|
||||
|
||||
int res = fluid_audio_driver_register(adrivers);
|
||||
if(res != FLUID_OK)
|
||||
|
@ -41,9 +45,15 @@ int main()
|
|||
fluid_synth_t* synth = new_fluid_synth(settings);
|
||||
fluid_audio_driver_t* ad = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
/*
|
||||
* ~~~ Do your daily business here ~~~
|
||||
*/
|
||||
|
||||
delete_fluid_audio_driver(ad);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
|
||||
/* everything cleaned up, fluid_audio_driver_register() can be called again if needed */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue