diff options
Diffstat (limited to 'src/synth.c')
-rw-r--r-- | src/synth.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/synth.c b/src/synth.c index 5ce932f..29c44e7 100644 --- a/src/synth.c +++ b/src/synth.c @@ -27,16 +27,20 @@ #include <string.h> #include <portaudio.h> +#include <portmidi.h> + /* graphics */ /* synth */ #include "synth_engine.h" #include "synth_gui.h" +#include "midi.h" #define NUM_SECONDS (1) #define WAVE_SIZE (44100) + static void StreamFinished( void* synthData ) { @@ -44,6 +48,7 @@ StreamFinished( void* synthData ) printf( "Stream Completed\n"); } + int main(void) { PaStreamParameters outputParameters; @@ -51,7 +56,10 @@ main(void) { PaError err; int i; synth_t synth; + midi_t midi; + init_synth(&synth); + init_midi(&midi, &synth); err = Pa_Initialize(); @@ -107,6 +115,8 @@ main(void) { return err; error: Pa_Terminate(); + free_synth(&synth); + terminate_midi(&midi); fprintf( stderr, "An error occurred while using the portaudio stream\n" ); fprintf( stderr, "Error number: %d\n", err ); fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) ); |