diff options
| author | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:56:29 +0200 |
|---|---|---|
| committer | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:56:29 +0200 |
| commit | acd5fefddbc6629095bcfae56edb87af8d40e4db (patch) | |
| tree | d09a573bce0a46e95c2da8c4336ecbfb6e6f67fa /tests/playsaw.cpp | |
| parent | 504ebe4ba69765df5ca0da115690c29e52a44c6d (diff) | |
| parent | 1022a7876a6ef1980ad5518340df177814783c7f (diff) | |
Merge 4.0.5 into releases
Diffstat (limited to 'tests/playsaw.cpp')
| -rw-r--r-- | tests/playsaw.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp index c39bcb4..b89d5f9 100644 --- a/tests/playsaw.cpp +++ b/tests/playsaw.cpp @@ -10,6 +10,7 @@ #include "RtAudio.h" #include <iostream> +#include <cstdlib> /* typedef signed long MY_TYPE; @@ -19,21 +20,21 @@ typedef signed long MY_TYPE; 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; #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 @@ -142,6 +143,7 @@ int main( int argc, char *argv[] ) oParams.firstChannel = offset; options.flags |= RTAUDIO_HOG_DEVICE; + options.flags |= RTAUDIO_SCHEDULE_REALTIME; #if !defined( USE_INTERLEAVED ) options.flags |= RTAUDIO_NONINTERLEAVED; #endif @@ -155,12 +157,12 @@ int main( int argc, char *argv[] ) } char input; + //std::cout << "Stream latency = " << dac.getStreamLatency() << "\n" << std::endl; std::cout << "\nPlaying ... press <enter> to quit (buffer size = " << bufferFrames << ").\n"; std::cin.get( input ); try { // Stop the stream - std::cout << "Stream latency = " << dac.getStreamLatency() << "\n" << std::endl; dac.stopStream(); } catch ( RtError& e ) { |
