This is a basic example of how to use the API.
#include <stdio.h>
#define SRC_LIMIT 8
#define MUSIC_ID SRC_LIMIT
int main()
{
const char* err;
err = faun_startup(32, SRC_LIMIT, 2, 0, "Faun Example");
if (err) {
printf("%s\n", err);
return 1;
}
faun_playStream(MUSIC_ID, "data/vintage_education.ogg", 0, 0,
faun_loadBuffer(0, "data/sa_enchant.rfx", 0, 0);
faun_waitSignal(&sig);
faun_shutdown();
return 0;
}
The Faun programmer interface.
@ FAUN_SIGNAL_DONE
Used to generate a FaunSignal when the source or stream is finished playing.
Definition faun.h:75
@ FAUN_PLAY_ONCE
Used to initiate playback of a source or stream a single time.
Definition faun.h:71
This struct is used for faun_pollSignals() & faun_waitSignal().
Definition faun.h:92