A few small memory leak fixes from MK
[rtaudio.git] / tests / playraw.cpp
index a9e4db15acdd00197a7413fa146561c59b6feb2f..7e7256ba0110e7477e87bdb986bd4f38b9100cf3 100644 (file)
 
 #include "RtAudio.h"
 #include <iostream>
+#include <cstdlib>
+#include <cstring>
+#include <stdio.h>
 
 /*
 typedef char  MY_TYPE;
 #define FORMAT RTAUDIO_SINT8
 #define SCALE  127.0
+*/
 
 typedef signed short  MY_TYPE;
 #define FORMAT RTAUDIO_SINT16
 #define SCALE  32767.0
 
-typedef signed long  MY_TYPE;
+/*
+typedef S24 MY_TYPE;
 #define FORMAT RTAUDIO_SINT24
 #define SCALE  8388607.0
 
-typedef signed long  MY_TYPE;
+typedef signed int  MY_TYPE;
 #define FORMAT RTAUDIO_SINT32
 #define SCALE  2147483647.0
-*/
 
 typedef float  MY_TYPE;
 #define FORMAT RTAUDIO_FLOAT32
 #define SCALE  1.0;
 
-/*
 typedef double  MY_TYPE;
 #define FORMAT RTAUDIO_FLOAT64
 #define SCALE  1.0;
@@ -127,7 +130,7 @@ int main( int argc, char *argv[] )
     dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &output, (void *)&data );
     dac.startStream();
   }
-  catch ( RtError& e ) {
+  catch ( RtAudioError& e ) {
     std::cout << '\n' << e.getMessage() << '\n' << std::endl;
     goto cleanup;
   }