summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary Scavone <gary@music.mcgill.ca>2007-08-07 14:52:05 +0000
committerStephen Sinclair <sinclair@music.mcgill.ca>2013-10-11 01:19:40 +0200
commitb0080e69d64ce69e21c8ce1b22b1bb7f888f1e58 (patch)
treeb51ebcd31a5280b4f4e9e45484f07d9b35723743 /tests
parent0fbcd74a04713a4725d2f346a493121b623d60ab (diff)
Check in of new version 4.0.0 distribution (GS).
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in33
-rw-r--r--tests/Windows/Debug/.placeholder0
-rw-r--r--tests/Windows/Release/.placeholder0
-rw-r--r--tests/Windows/call_inout.dsp158
-rw-r--r--tests/Windows/call_playtwo.dsp110
-rw-r--r--tests/Windows/call_saw.dsp158
-rw-r--r--tests/Windows/call_twostreams.dsp110
-rw-r--r--tests/Windows/in_out.dsp158
-rw-r--r--tests/Windows/info.dsp158
-rw-r--r--tests/Windows/play_raw.dsp158
-rw-r--r--tests/Windows/play_saw.dsp158
-rw-r--r--tests/Windows/record_raw.dsp158
-rw-r--r--tests/Windows/rtaudio.dsw113
-rw-r--r--tests/Windows/rtaudiotest/Release/.placeholder0
-rw-r--r--tests/Windows/rtaudiotest/StdOpt.cpp91
-rw-r--r--tests/Windows/rtaudiotest/StdOpt.h186
-rw-r--r--tests/Windows/rtaudiotest/readme.txt8
-rw-r--r--tests/Windows/rtaudiotest/rtaudiotest.cpp386
-rw-r--r--tests/Windows/rtaudiotest/rtaudiotest.dsp146
-rw-r--r--tests/Windows/rtaudiotest/rtaudiotest.dsw29
-rw-r--r--tests/Windows/twostreams.dsp158
-rw-r--r--tests/call_inout.cpp102
-rw-r--r--tests/call_saw.cpp130
-rw-r--r--tests/duplex.cpp131
-rw-r--r--tests/in_out.cpp111
-rw-r--r--tests/play_raw.cpp132
-rw-r--r--tests/play_saw.cpp129
-rw-r--r--tests/playraw.cpp146
-rw-r--r--tests/playsaw.cpp177
-rw-r--r--tests/probe.cpp (renamed from tests/info.cpp)58
-rw-r--r--tests/record.cpp169
-rw-r--r--tests/record_raw.cpp118
-rw-r--r--tests/testall.cpp221
-rw-r--r--tests/twostreams.cpp221
34 files changed, 891 insertions, 3430 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 54f4d4a..be9cc8b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,6 +1,6 @@
### RtAudio tests Makefile - for various flavors of unix
-PROGRAMS = info play_saw record_raw in_out play_raw twostreams call_saw call_inout
+PROGRAMS = probe playsaw playraw record duplex testall
RM = /bin/rm
SRC_PATH = ../
INCLUDE = ../
@@ -22,34 +22,29 @@ LIBRARY += @frameworks@
all : $(PROGRAMS)
-info : info.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o info info.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+probe : probe.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o probe probe.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-play_saw : play_saw.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o play_saw play_saw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+playsaw : playsaw.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o playsaw playsaw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-play_raw : play_raw.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o play_raw play_raw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+playraw : playraw.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o playraw playraw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-record_raw : record_raw.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o record_raw record_raw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+record : record.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o record record.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-in_out : in_out.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o in_out in_out.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+duplex : duplex.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o duplex duplex.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-twostreams : twostreams.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o twostreams twostreams.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
+testall : testall.cpp $(OBJECTS)
+ $(CC) $(CFLAGS) $(DEFS) -o testall testall.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-call_saw : call_saw.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o call_saw call_saw.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
-
-call_inout : call_inout.cpp $(OBJECTS)
- $(CC) $(CFLAGS) $(DEFS) -o call_inout call_inout.cpp $(OBJECT_PATH)/RtAudio.o $(LIBRARY)
clean :
-rm $(OBJECT_PATH)/*.o
-rm $(PROGRAMS)
- -rm -f *~
+ -rm -f *.raw *~
strip :
strip $(PROGRAMS)
diff --git a/tests/Windows/Debug/.placeholder b/tests/Windows/Debug/.placeholder
deleted file mode 100644
index e69de29..0000000
--- a/tests/Windows/Debug/.placeholder
+++ /dev/null
diff --git a/tests/Windows/Release/.placeholder b/tests/Windows/Release/.placeholder
deleted file mode 100644
index e69de29..0000000
--- a/tests/Windows/Release/.placeholder
+++ /dev/null
diff --git a/tests/Windows/call_inout.dsp b/tests/Windows/call_inout.dsp
deleted file mode 100644
index 490dacc..0000000
--- a/tests/Windows/call_inout.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="call_inout" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=call_inout - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "call_inout.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "call_inout.mak" CFG="call_inout - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "call_inout - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "call_inout - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "call_inout - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "call_inout - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "call_inout - Win32 Release"
-# Name "call_inout - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\call_inout.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/call_playtwo.dsp b/tests/Windows/call_playtwo.dsp
deleted file mode 100644
index 1c9966b..0000000
--- a/tests/Windows/call_playtwo.dsp
+++ /dev/null
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="call_playtwo" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=call_playtwo - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "call_playtwo.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "call_playtwo.mak" CFG="call_playtwo - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "call_playtwo - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "call_playtwo - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "call_playtwo - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "call_playtwo - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "call_playtwo - Win32 Release"
-# Name "call_playtwo - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\call_playtwo.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/call_saw.dsp b/tests/Windows/call_saw.dsp
deleted file mode 100644
index 0c1fcd9..0000000
--- a/tests/Windows/call_saw.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="call_saw" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=call_saw - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "call_saw.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "call_saw.mak" CFG="call_saw - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "call_saw - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "call_saw - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "call_saw - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "call_saw - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "call_saw - Win32 Release"
-# Name "call_saw - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\call_saw.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/call_twostreams.dsp b/tests/Windows/call_twostreams.dsp
deleted file mode 100644
index 16da2e5..0000000
--- a/tests/Windows/call_twostreams.dsp
+++ /dev/null
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="call_twostreams" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=call_twostreams - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "call_twostreams.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "call_twostreams.mak" CFG="call_twostreams - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "call_twostreams - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "call_twostreams - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "call_twostreams - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "call_twostreams - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "call_twostreams - Win32 Release"
-# Name "call_twostreams - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\call_twostreams.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/in_out.dsp b/tests/Windows/in_out.dsp
deleted file mode 100644
index f9cfd7d..0000000
--- a/tests/Windows/in_out.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="in_out" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=in_out - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "in_out.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "in_out.mak" CFG="in_out - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "in_out - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "in_out - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "in_out - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "in_out - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "in_out - Win32 Release"
-# Name "in_out - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\in_out.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/info.dsp b/tests/Windows/info.dsp
deleted file mode 100644
index d69a64e..0000000
--- a/tests/Windows/info.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="info" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=info - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "info.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "info.mak" CFG="info - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "info - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "info - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "info - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "info - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "info - Win32 Release"
-# Name "info - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\info.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/play_raw.dsp b/tests/Windows/play_raw.dsp
deleted file mode 100644
index 51f2f01..0000000
--- a/tests/Windows/play_raw.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="play_raw" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=play_raw - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "play_raw.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "play_raw.mak" CFG="play_raw - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "play_raw - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "play_raw - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "play_raw - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "play_raw - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "play_raw - Win32 Release"
-# Name "play_raw - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\play_raw.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/play_saw.dsp b/tests/Windows/play_saw.dsp
deleted file mode 100644
index d769d9b..0000000
--- a/tests/Windows/play_saw.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="play_saw" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=play_saw - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "play_saw.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "play_saw.mak" CFG="play_saw - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "play_saw - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "play_saw - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "play_saw - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "play_saw - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "play_saw - Win32 Release"
-# Name "play_saw - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\play_saw.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/record_raw.dsp b/tests/Windows/record_raw.dsp
deleted file mode 100644
index 2092a61..0000000
--- a/tests/Windows/record_raw.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="record_raw" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=record_raw - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "record_raw.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "record_raw.mak" CFG="record_raw - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "record_raw - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "record_raw - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "record_raw - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "record_raw - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "record_raw - Win32 Release"
-# Name "record_raw - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\record_raw.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/rtaudio.dsw b/tests/Windows/rtaudio.dsw
deleted file mode 100644
index 26b9d4f..0000000
--- a/tests/Windows/rtaudio.dsw
+++ /dev/null
@@ -1,113 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "call_inout"=".\call_inout.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "call_saw"=".\call_saw.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "in_out"=".\in_out.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "info"=".\info.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "play_raw"=".\play_raw.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "play_saw"=".\play_saw.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "record_raw"=".\record_raw.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "twostreams"=".\twostreams.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/tests/Windows/rtaudiotest/Release/.placeholder b/tests/Windows/rtaudiotest/Release/.placeholder
deleted file mode 100644
index e69de29..0000000
--- a/tests/Windows/rtaudiotest/Release/.placeholder
+++ /dev/null
diff --git a/tests/Windows/rtaudiotest/StdOpt.cpp b/tests/Windows/rtaudiotest/StdOpt.cpp
deleted file mode 100644
index 02c8eea..0000000
--- a/tests/Windows/rtaudiotest/StdOpt.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/************************************************************************/
-/*! \class CommandLine
- \brief Command-line option parser.
-
- Copyright (c) 2005 Robin Davies.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/************************************************************************/
-
-#include ".\stdopt.h"
-
-using namespace stdopt;
-
-CommandLine::CommandLine()
-{
-}
-
-void CommandLine::ProcessCommandLine(int argc, char**argv)
-{
- std::vector<std::string> cmdline;
- for (int i = 0; i < argc; ++i) {
- cmdline.push_back(argv[i]);
- }
- ProcessCommandLine(cmdline);
-}
-
-const CommandLine::COptionHandlerBase*CommandLine::GetOptionHandler(const std::string &name) const
-{
- // Return excact matches only.
- for (size_t i = 0; i < optionHandlers.size(); ++i)
- {
- if (optionHandlers[i]->getName() == name) {
- return (optionHandlers[i]);
- }
- }
- return NULL;
-}
-
-void CommandLine::ProcessCommandLine(const std::vector<std::string>& cmdline)
-{
- for (size_t i = 1; i < cmdline.size(); ++i)
- {
- if (cmdline[i].length() != 0 && cmdline[i][0] == L'/' || (cmdline[i][0] == '-')) {
- std::string arg = cmdline[i].substr(1);
- const COptionHandlerBase *pHandler = GetOptionHandler(arg);
- if (pHandler == NULL) {
- throw CommandLineException(std::string("Unknown option: ") + arg);
- }
- if (pHandler->HasArgument())
- {
- std::string strArg;
- if (i+1 < cmdline.size()) {
- ++i;
- strArg = cmdline[i];
- }
- pHandler->Process(strArg.c_str());
- } else {
- pHandler->Process(NULL);
- }
- } else {
- args.push_back(cmdline[i]);
- }
- }
-}
-
-CommandLine::~CommandLine(void)
-{
- for (size_t i = 0; i < optionHandlers.size(); ++i)
- {
- delete optionHandlers[i];
- }
- optionHandlers.resize(0);
-}
diff --git a/tests/Windows/rtaudiotest/StdOpt.h b/tests/Windows/rtaudiotest/StdOpt.h
deleted file mode 100644
index 4de660a..0000000
--- a/tests/Windows/rtaudiotest/StdOpt.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/************************************************************************/
-/*! \class CommandLine
- \brief Command-line opition parser.
-
- Copyright (c) 2005 Robin Davies.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/************************************************************************/
-
-#ifndef STDOPT_H
-#define STDOPT_H
-
-#include <vector>
-#include <string>
-#include <sstream>
-#include <exception>
-
-namespace stdopt
-{
-
- class CommandLineException: public std::exception {
- public:
- CommandLineException(const std::string &error)
- {
- s = error;
- }
- const char*what() { return s.c_str(); }
- private:
- std::string s;
- };
-
- class CommandLine
- {
- public:
- CommandLine();
- virtual ~CommandLine();
-
- void ProcessCommandLine(int argc, char**argv);
- void ProcessCommandLine(const std::vector<std::string>& cmdline);
-
- template <class TVAL> void AddOption(const char*name,TVAL*pResult, TVAL defaultValue)
- {
- this->optionHandlers.push_back(new COptionHandler<TVAL>(name,pResult));
- *pResult = defaultValue;
-
- }
- template <class TVAL> void AddOption(const char*name,TVAL*pResult)
- {
- this->optionHandlers.push_back(new COptionHandler<TVAL>(name,pResult));
- }
- const std::vector<std::string> &GetArguments() { return args; }
- template <class T> void GetArgument(size_t arg, T*pVal)
- {
- if (arg >= args.size()) {
- std::stringstream os;
- os << "Argument " << (arg+1) << " not provided.";
- throw CommandLineException(os.str());
- }
- std::stringstream is(args[arg]);
- T value;
- is >> value;
- if (!is.fail() && is.eof())
- {
- *pVal = value;
- } else {
- std::stringstream os;
- os << "Argument " << (arg+1) << " was not in the correct format.";
- throw CommandLineException(os.str());
- }
- }
- void GetArgument(size_t arg, std::string*pVal)
- {
- if (arg >= args.size()) {
- std::stringstream os;
- os << "Argument " << (arg+1) << " not provided.";
- throw CommandLineException(os.str());
- }
- *pVal = args[arg];
- }
-
-
- private:
-
- class COptionHandlerBase {
- public:
- COptionHandlerBase(const std::string & name) { this->name = name;}
- virtual ~COptionHandlerBase() { };
- const std::string &getName() const { return name; }
- virtual bool HasArgument()const = 0;
- virtual void Process(const char* value) const = 0;
- private:
- std::string name;
- };
- template <class T> class COptionHandler: public COptionHandlerBase {
- public:
- COptionHandler(const std::string &name,T *result, T defaultValue = T())
- : COptionHandlerBase(name)
- {
- _pResult = result;
- *_pResult = defaultValue;
-
- }
- virtual bool HasArgument() const;
-
- virtual void Process(const char *strValue) const {
- std::stringstream is(strValue);
- T value;
- is >> value;
- if (!is.fail() && is.eof())
- {
- *_pResult = value;
- } else {
- std::stringstream os;
- os << "Invalid value provided for option '" << getName() << "'.";
- throw CommandLineException(os.str().c_str());
- }
- }
-
- private:
- std::string strName;
- T*_pResult;
- };
- const CommandLine::COptionHandlerBase*GetOptionHandler(const std::string &name) const;
-
- std::vector<std::string > args;
- std::vector<COptionHandlerBase*> optionHandlers;
- };
-
- // Argument specializations for bool.
- template <class T> bool CommandLine::COptionHandler<T>::HasArgument()const {
- return true;
- };
- inline bool CommandLine::COptionHandler<bool>::HasArgument() const {
- return false;
- }
- inline void CommandLine::COptionHandler<bool>::Process(const char*strValue) const {
- if (strValue == NULL)
- {
- *_pResult = true;
- return;
- }
- switch (*strValue)
- {
- case '\0':
- case '+':
- *_pResult = true;
- break;
- case '-':
- *_pResult = false;
- break;
- default:
- throw CommandLineException("Please specify '+' or '-' for boolean options.");
- }
- }
- // specializations for std::string.
- inline void CommandLine::COptionHandler<std::string >::Process(const char*strValue)const {
- *_pResult = strValue;
- }
-
- // specializations for std::vector<std::string>
- inline void CommandLine::COptionHandler<std::vector<std::string> >::Process(const char*strValue)const {
- _pResult->push_back(strValue);
- }
-};
-
-
-
-#endif
diff --git a/tests/Windows/rtaudiotest/readme.txt b/tests/Windows/rtaudiotest/readme.txt
deleted file mode 100644
index d883384..0000000
--- a/tests/Windows/rtaudiotest/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-rtaudiotest - Test rtaudio devices.
-
-rtaudiotest is a small tool that allows easy testing of rtaudio devices
-and configurations.
-
-Run rtaudiotest.exe for a description of how to run it.
-
-rtaudiotest is currently only supported for the Windows platform.
diff --git a/tests/Windows/rtaudiotest/rtaudiotest.cpp b/tests/Windows/rtaudiotest/rtaudiotest.cpp
deleted file mode 100644
index 90d8c2c..0000000
--- a/tests/Windows/rtaudiotest/rtaudiotest.cpp
+++ /dev/null
@@ -1,386 +0,0 @@
-/************************************************************************/
-/*! \brief Interactively Test RtAudio parameters.
-
- RtAudio is a command-line utility that allows users to enumerate
- installed devices, and to test input, output and duplex operation
- of RtAudio devices with various buffer and buffer-size
- configurations.
-
- Copyright (c) 2005 Robin Davies.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation files
- (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/************************************************************************/
-
-#include "RtAudio.h"
-#include "FileWvOut.h"
-
-#include <cmath>
-#include <iostream>
-#include <stdopt.h>
-
-using namespace std;
-using namespace stdopt;
-
-#ifdef _WIN32
-// Correct windows.h standards violation.
-#undef min
-#undef max
-#endif
-
-#define DSOUND 1
-
-RtAudio::RtAudioApi rtApi = RtAudio::WINDOWS_DS;
-
-void DisplayHelp(std::ostream &os)
-{
- os
- << "rtaudiotest - Test rtaudio devices." << endl
- << endl
- << "Syntax:" << endl
- << " rtaudiotest [options]* enum" << endl
- << " - Display installed devices." << endl
- << " rtaudiotest [options]* inputtest <devicenum> [<filename>]" << endl
- << " - Capture audio to a .wav file." << endl
- << " rtaudiotest [options]* outputtest <devicenum>" << endl
- << " - Generate a test signal on the device.." << endl
- << " rtaudiotest [options]* duplextest <inputDevicenum> <outputdevicenum>" << endl
- << " - Echo input to output." << endl
-
- << "Options:" << endl
- << " -h -? Display this message." << endl
- << " -dsound Use DirectX drivers." << endl
- << " -asio Use ASIO drivers." << endl
- << " -buffers N Use N buffers." << endl
- << " -size N Use buffers of size N." << endl
- << " -srate N Use a sample-rate of N (defaults to 44100)." << endl
- << " -channels N Use N channels (defaults to 2)." << endl
- << " -seconds N Run the test for N seconds (default 5)." << endl
- << "Description: " << endl
- << " RtAudio is a command-line utility that allows users to enumerate " << endl
- << " installed devices, and to test input, output and duplex operation " << endl
- << " of RtAudio devices with various buffer and buffer-size " << endl
- << " configurations." << endl
- << "Examples:" << endl
- << " rtaudio -asio enum" << endl
- << " rtaudio -dsound -buffers 4 -size 128 -seconds 3 inputtest 0 test.wav" << endl
- ;
-
-}
-
-void EnumerateDevices(RtAudio::RtAudioApi api)
-{
- RtAudio rt(api);
- for (int i = 1; i <= rt.getDeviceCount(); ++i)
- {
- RtAudioDeviceInfo info = rt.getDeviceInfo(i);
- cout << "Device " << i << ": " << info.name << endl;
- }
-}
-
-struct TestConfiguration
-{
- long srate;
- int channels;
- int bufferSize;
- int buffers;
- int seconds;
-};
-
-
-bool DisplayStats(RtAudio::RtAudioApi api)
-{
-#ifdef __WINDOWS_DS__
- // Display latency results for Windows DSound drivers.
- if (api == RtAudio::WINDOWS_DS)
- {
- RtApiDs::RtDsStatistics s = RtApiDs::getDsStatistics();
-
- cout << " Latency: " << s.latency*1000.0 << "ms" << endl;
- if (s.inputFrameSize)
- {
- cout << " Read overruns: " << s.numberOfReadOverruns << endl;
- }
- if (s.outputFrameSize)
- {
- cout << " Write underruns: " << s.numberOfWriteUnderruns << endl;
- }
-
- if (s.inputFrameSize)
- {
- cout << " Read lead time in sample frames (device): " << s.readDeviceSafeLeadBytes/ s.inputFrameSize << endl;
- }
- if (s.outputFrameSize)
- {
- cout << " Write lead time in sample frames (device): " << s.writeDeviceSafeLeadBytes / s.outputFrameSize << endl;
- cout << " Write lead time in sample frames (buffer): " << s.writeDeviceBufferLeadBytes / s.outputFrameSize << endl;
-
- }
-
- }
-#endif
- return true;
-}
-
-void InputTest( RtAudio::RtAudioApi api,
- int inputDevice,
- const std::string &fileName,
- TestConfiguration &configuration )
-{
- RtAudio rt(api);
-
- int bufferSize = configuration.bufferSize;
-
- RtAudioDeviceInfo info = rt.getDeviceInfo(inputDevice);
- cout << "Reading from device " << inputDevice << " (" << info.name << ")\n";
-
- rt.openStream(0,0,inputDevice,configuration.channels, RTAUDIO_SINT16, configuration.srate,&bufferSize,configuration.buffers);
- if (bufferSize != configuration.bufferSize)
- {
- cout << "The buffer size was changed to " << bufferSize << " by the device." << endl;
- configuration.bufferSize = bufferSize;
-
- }
-
- int nTicks = (int)ceil((configuration.srate* configuration.seconds)*1.0/configuration.bufferSize);
-
- if (fileName.length() == 0)
- {
- // just run the stream.
- rt.startStream();
- for (int i = 0; i < nTicks; ++i)
- {
- rt.tickStream();
- }
- rt.stopStream();
- } else
- {
- if (configuration.seconds > 10) {
- throw CommandLineException("Capture of more than 10 seconds of data is not supported.");
- }
- std::vector<short> data;
- // we could be smarter, but the point here is to capture data without interfering with the stream.
- // File writes while ticking the stream is not cool.
- data.resize(nTicks*configuration.bufferSize*configuration.channels); // potentially very big. That's why we restrict capture to 10 seconds.
- short *pData = &data[0];
-
- rt.startStream();
- int i;
- for (i = 0; i < nTicks; ++i)
- {
- rt.tickStream();
- short *streamBuffer = (short*)rt.getStreamBuffer();
- for (int samples = 0; samples < configuration.bufferSize; ++samples)
- {
- for (int channel = 0; channel < configuration.channels; ++channel)
- {
- *pData ++ = *streamBuffer++;
- }
- }
- }
- rt.stopStream();
- remove(fileName.c_str());
- FileWvOut wvOut;
- wvOut.openFile( fileName.c_str(), configuration.channels, FileWrite::FILE_WAV );
-
- StkFrames frame(1,configuration.channels,false);
- pData = &data[0];
-
- for (i = 0; i < nTicks; ++i) {
- for (int samples = 0; samples < configuration.bufferSize; ++samples) {
- for (int channel = 0; channel < configuration.channels; ++channel) {
- frame[channel] = (float)( *pData++*( 1.0 / 32768.0 ) );
- }
- wvOut.tickFrame(frame);
- }
- }
- wvOut.closeFile();
- }
- rt.closeStream();
-
- if (DisplayStats(api)) {
- cout << "Test succeeded." << endl;
- }
-}
-
-void OutputTest( RtAudio::RtAudioApi api,
- int outputDevice,
- TestConfiguration &configuration )
-{
- RtAudio rt(api);
- int bufferSize = configuration.bufferSize;
-
- RtAudioDeviceInfo info = rt.getDeviceInfo(outputDevice);
- cout << "Writing to " << info.name << "...\n";
-
- rt.openStream(outputDevice,configuration.channels, 0,0, RTAUDIO_SINT16, configuration.srate,&bufferSize,configuration.buffers);
- if (bufferSize != configuration.bufferSize) {
- cout << "The buffer size was changed to " << bufferSize << " by the device." << endl;
- configuration.bufferSize = bufferSize;
- }
-
- rt.startStream();
- short *pBuffer = (short*)rt.getStreamBuffer();
- int nTicks = (int)ceil((configuration.srate* configuration.seconds)*1.0/configuration.bufferSize);
-
- double phase = 0;
- double deltaPhase = 880.0/configuration.srate;
- for (int i = 0; i < nTicks; ++i) {
- short *p = pBuffer;
- for (int samp = 0; samp < configuration.bufferSize; ++samp) {
- short val = (short)(sin(phase)*(32768/4)); // sin()*0.25 magnitude. Audible, but not damaging to ears or speakers.
- phase += deltaPhase;
-
- for (int chan = 0; chan < configuration.channels; ++chan) {
- *p++ = val;
- }
- }
- rt.tickStream();
- }
- rt.stopStream();
- rt.closeStream();
-
- if ( DisplayStats(api) ) {
- cout << "Test succeeded." << endl;
- }
-}
-
-void DuplexTest( RtAudio::RtAudioApi api,
- int inputDevice,
- int outputDevice,
- TestConfiguration &configuration )
-{
- RtAudio rt(api);
- int bufferSize = configuration.bufferSize;
-
- RtAudioDeviceInfo info = rt.getDeviceInfo(inputDevice);
- cout << "Reading from " << info.name << ", " << endl;
- info = rt.getDeviceInfo(outputDevice);
- cout << "Writing to " << info.name << "..." << endl;
-
- rt.openStream(outputDevice,configuration.channels, inputDevice,configuration.channels, RTAUDIO_SINT16, configuration.srate,&bufferSize,configuration.buffers);
- if (bufferSize != configuration.bufferSize)
- {
- cout << "The buffer size was changed to " << bufferSize << " by the device." << endl;
- configuration.bufferSize = bufferSize;
- }
-
- rt.startStream();
- short *pBuffer = (short*)rt.getStreamBuffer();
- int nTicks = (int)ceil((configuration.srate* configuration.seconds)*1.0/configuration.bufferSize);
-
- for (int i = 0; i < nTicks; ++i) {
- rt.tickStream();
- }
- rt.stopStream();
- rt.closeStream();
-
- if ( DisplayStats(api) ) {
- cout << "Test succeeded." << endl;
- }
-}
-
-int main(int argc, char **argv)
-{
- try
- {
- CommandLine commandLine;
-
- TestConfiguration configuration;
- bool displayHelp;
- bool useDsound;
- bool useAsio;
-
- commandLine.AddOption("h",&displayHelp);
- commandLine.AddOption("?",&displayHelp);
- commandLine.AddOption("dsound",&useDsound);
- commandLine.AddOption("asio",&useAsio);
- commandLine.AddOption("srate",&configuration.srate,44100L);
- commandLine.AddOption("channels",&configuration.channels,2);
- commandLine.AddOption("seconds",&configuration.seconds,5);
- commandLine.AddOption("buffers",&configuration.buffers,2);
- commandLine.AddOption("size",&configuration.bufferSize,128);
-
- commandLine.ProcessCommandLine(argc,argv);
-
- if (displayHelp || commandLine.GetArguments().size() == 0)
- {
- DisplayHelp(cout);
- return 0;
- }
- if (useDsound)
- {
- rtApi = RtAudio::WINDOWS_DS;
- } else if (useAsio)
- {
- rtApi = RtAudio::WINDOWS_ASIO;
- } else {
- throw CommandLineException("Please specify an API to use: '-dsound', or '-asio'");
- }
-
- std::string testName;
- commandLine.GetArgument(0,&testName);
- if (testName == "enum")
- {
- EnumerateDevices(rtApi);
- } else if (testName == "inputtest")
- {
- int inputDevice;
- std::string fileName;
- commandLine.GetArgument(1,&inputDevice);
- if (commandLine.GetArguments().size() >= 2)
- {
- commandLine.GetArgument(2,&fileName);
- }
- InputTest(rtApi,inputDevice,fileName,configuration);
- } else if (testName == "outputtest")
- {
- int inputDevice;
- commandLine.GetArgument(1,&inputDevice);
- OutputTest(rtApi,inputDevice,configuration);
- } else if (testName == "duplextest")
- {
- int inputDevice;
- int outputDevice;
- commandLine.GetArgument(1,&inputDevice);
- commandLine.GetArgument(2,&outputDevice);
- DuplexTest(rtApi,inputDevice,outputDevice,configuration);
- } else {
- throw CommandLineException("Not a valid test name.");
- }
-
- } catch (CommandLineException &e)
- {
- cerr << e.what() << endl << endl;
- cerr << "Run 'rtaudiotest -h' to see the commandline syntax." << endl;
- return 3;
- } catch (RtError &e)
- {
- cerr << e.getMessage() << endl;
- return 3;
-
- } catch (std::exception &e)
- {
- cerr << "Error: " << e.what() << endl;
- return 3;
-
- }
- return 0;
-}
diff --git a/tests/Windows/rtaudiotest/rtaudiotest.dsp b/tests/Windows/rtaudiotest/rtaudiotest.dsp
deleted file mode 100644
index 519756b..0000000
--- a/tests/Windows/rtaudiotest/rtaudiotest.dsp
+++ /dev/null
@@ -1,146 +0,0 @@
-# Microsoft Developer Studio Project File - Name="rtaudiotest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=rtaudiotest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "rtaudiotest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "rtaudiotest.mak" CFG="rtaudiotest - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "rtaudiotest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "rtaudiotest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "rtaudiotest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__LITTLE_ENDIAN__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /subsystem:console /debug /machine:I386
-
-!ELSEIF "$(CFG)" == "rtaudiotest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__LITTLE_ENDIAN__" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "rtaudiotest - Win32 Release"
-# Name "rtaudiotest - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\src\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\RtAudio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\rtaudiotest.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdOpt.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\Stk.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\WvOut.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\include\RtAudio.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\StdOpt.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\Stk.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\WvOut.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/Windows/rtaudiotest/rtaudiotest.dsw b/tests/Windows/rtaudiotest/rtaudiotest.dsw
deleted file mode 100644
index eabbccd..0000000
--- a/tests/Windows/rtaudiotest/rtaudiotest.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "rtaudiotest"=".\rtaudiotest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/tests/Windows/twostreams.dsp b/tests/Windows/twostreams.dsp
deleted file mode 100644
index 303de35..0000000
--- a/tests/Windows/twostreams.dsp
+++ /dev/null
@@ -1,158 +0,0 @@
-# Microsoft Developer Studio Project File - Name="twostreams" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=twostreams - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "twostreams.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "twostreams.mak" CFG="twostreams - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "twostreams - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "twostreams - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "twostreams - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "twostreams - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_DS__" /D "__WINDOWS_ASIO__" /D "__RTAUDIO_DEBUG__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 dsound.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "twostreams - Win32 Release"
-# Name "twostreams - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\twostreams.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\asio\asio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrivers.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiodrvr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiolist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\asiosys.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\ginclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiodrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\asio\iasiothiscallresolver.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\RtAudio.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/tests/call_inout.cpp b/tests/call_inout.cpp
deleted file mode 100644
index f51ad6f..0000000
--- a/tests/call_inout.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/******************************************/
-/*
- call_inout.cpp
- by Gary P. Scavone, 2001
-
- Records from default input and passes it
- through to the output. Takes number of
- channels and sample rate as input arguments.
- Uses callback functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-
-/*
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-
-typedef char MY_TYPE;
-#define FORMAT RTAUDIO_SINT8
-
-typedef signed short MY_TYPE;
-#define FORMAT RTAUDIO_SINT16
-
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT32
-
-typedef float MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT32
-*/
-
-typedef double MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT64
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: call_inout N fs device\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int inout(char *buffer, int buffer_size, void *)
-{
- // Surprise!! We do nothing to pass the data through.
- return 0;
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, device = 0;
- RtAudio *audio = 0;
- char input;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- int buffer_size = 512;
- try {
- audio = new RtAudio( device, chans, device, chans,
- FORMAT, fs, &buffer_size, 8 );
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- try {
- audio->setStreamCallback(&inout, NULL);
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nRunning ... press <enter> to quit (buffer size = " << buffer_size << ").\n";
- std::cin.get(input);
-
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
-
- return 0;
-}
diff --git a/tests/call_saw.cpp b/tests/call_saw.cpp
deleted file mode 100644
index b37841b..0000000
--- a/tests/call_saw.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/******************************************/
-/*
- call_saw.c
- by Gary P. Scavone, 2001
-
- Play sawtooth waveforms of distinct frequency.
- Takes number of channels and sample rate as
- input arguments. Use callback functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-
-/*
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-#define SCALE 2147483647.0
-
-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
-*/
-
-#define BASE_RATE 0.005
-#define TIME 1.0
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: call_saw N fs <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int chans;
-
-int saw(char *buffer, int buffer_size, void *data)
-{
- int i, j;
- extern int chans;
- MY_TYPE *my_buffer = (MY_TYPE *) buffer;
- double *my_data = (double *) data;
-
- for (i=0; i<buffer_size; i++) {
- for (j=0; j<chans; j++) {
- *my_buffer++ = (MY_TYPE) (my_data[j] * SCALE);
- my_data[j] += BASE_RATE * (j+1+(j*0.1));
- if (my_data[j] >= 1.0) my_data[j] -= 2.0;
- }
- }
-
- return 0;
-}
-
-int main(int argc, char *argv[])
-{
- int buffer_size, fs, device = 0;
- RtAudio *audio = 0;
- double *data = 0;
- char input;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- buffer_size = 1024;
- try {
- audio = new RtAudio(device, chans, 0, 0,
- FORMAT, fs, &buffer_size, 4);
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- data = (double *) calloc(chans, sizeof(double));
-
- try {
- audio->setStreamCallback(&saw, (void *)data);
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nPlaying ... press <enter> to quit (buffer size = " << buffer_size << ").\n";
- std::cin.get(input);
-
- // Stop the stream.
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
- if (data) free(data);
-
- return 0;
-}
diff --git a/tests/duplex.cpp b/tests/duplex.cpp
new file mode 100644
index 0000000..5e63cd7
--- /dev/null
+++ b/tests/duplex.cpp
@@ -0,0 +1,131 @@
+/******************************************/
+/*
+ duplex.cpp
+ by Gary P. Scavone, 2006-2007.
+
+ This program opens a duplex stream and passes
+ input directly through to the output.
+*/
+/******************************************/
+
+#include "RtAudio.h"
+#include <iostream>
+
+/*
+typedef signed long MY_TYPE;
+#define FORMAT RTAUDIO_SINT24
+
+typedef char MY_TYPE;
+#define FORMAT RTAUDIO_SINT8
+
+typedef signed short MY_TYPE;
+#define FORMAT RTAUDIO_SINT16
+
+typedef signed long MY_TYPE;
+#define FORMAT RTAUDIO_SINT32
+
+typedef float MY_TYPE;
+#define FORMAT RTAUDIO_FLOAT32
+*/
+
+typedef double MY_TYPE;
+#define FORMAT RTAUDIO_FLOAT64
+
+void usage( void ) {
+ // Error function in case of incorrect command-line
+ // argument specifications
+ std::cout << "\nuseage: duplex N fs <iDevice> <oDevice> <iChannelOffset> <oChannelOffset>\n";
+ std::cout << " where N = number of channels,\n";
+ std::cout << " fs = the sample rate,\n";
+ std::cout << " iDevice = optional input device to use (default = 0),\n";
+ std::cout << " oDevice = optional output device to use (default = 0),\n";
+ std::cout << " iChannelOffset = an optional input channel offset (default = 0),\n";
+ std::cout << " and oChannelOffset = optional output channel offset (default = 0).\n\n";
+ exit( 0 );
+}
+
+int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ // Since the number of input and output channels is equal, we can do
+ // a simple buffer copy operation here.
+ if ( status ) std::cout << "Stream over/underflow detected." << std::endl;
+
+ unsigned long *bytes = (unsigned long *) data;
+ memcpy( outputBuffer, inputBuffer, *bytes );
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ unsigned int channels, fs, bufferBytes, oDevice = 0, iDevice = 0, iOffset = 0, oOffset = 0;
+
+ // Minimal command-line checking
+ if (argc < 3 || argc > 7 ) usage();
+
+ RtAudio adac;
+ if ( adac.getDeviceCount() < 1 ) {
+ std::cout << "\nNo audio devices found!\n";
+ exit( 0 );
+ }
+
+ channels = (unsigned int) atoi(argv[1]);
+ fs = (unsigned int) atoi(argv[2]);
+ if ( argc > 3 )
+ iDevice = (unsigned int) atoi(argv[3]);
+ if ( argc > 4 )
+ oDevice = (unsigned int) atoi(argv[4]);
+ if ( argc > 5 )
+ iOffset = (unsigned int) atoi(argv[5]);
+ if ( argc > 6 )
+ oOffset = (unsigned int) atoi(argv[6]);
+
+ // Let RtAudio print messages to stderr.
+ adac.showWarnings( true );
+
+ // Set the same number of channels for both input and output.
+ unsigned int bufferFrames = 512;
+ RtAudio::StreamParameters iParams, oParams;
+ iParams.deviceId = iDevice;
+ iParams.nChannels = channels;
+ iParams.firstChannel = iOffset;
+ oParams.deviceId = oDevice;
+ oParams.nChannels = channels;
+ oParams.firstChannel = oOffset;
+
+ RtAudio::StreamOptions options;
+ //options.flags |= RTAUDIO_NONINTERLEAVED;
+
+ try {
+ adac.openStream( &oParams, &iParams, FORMAT, fs, &bufferFrames, &inout, (void *)&bufferBytes, &options );
+ }
+ catch ( RtError& e ) {
+ std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+ exit( 0 );
+ }
+
+ bufferBytes = bufferFrames * channels * sizeof( MY_TYPE );
+
+ // Test RtAudio functionality for reporting latency.
+ std::cout << "\nStream latency = " << adac.getStreamLatency() << " frames" << std::endl;
+
+ try {
+ adac.startStream();
+
+ char input;
+ std::cout << "\nRunning ... press <enter> to quit (buffer frames = " << bufferFrames << ").\n";
+ std::cin.get(input);
+
+ // Stop the stream.
+ adac.stopStream();
+ }
+ catch ( RtError& e ) {
+ std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+ goto cleanup;
+ }
+
+ cleanup:
+ if ( adac.isStreamOpen() ) adac.closeStream();
+
+ return 0;
+}
diff --git a/tests/in_out.cpp b/tests/in_out.cpp
deleted file mode 100644
index 18fa8c1..0000000
--- a/tests/in_out.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/******************************************/
-/*
- in_out.c
- by Gary P. Scavone, 2001
-
- Records from default input and passes it
- through to the output. Takes number of
- channels and sample rate as input arguments.
- Use blocking functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-
-/*
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-
-typedef char MY_TYPE;
-#define FORMAT RTAUDIO_SINT8
-
-typedef signed short MY_TYPE;
-#define FORMAT RTAUDIO_SINT16
-
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT32
-
-typedef float MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT32
-*/
-
-typedef double MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT64
-
-#define TIME 4.0
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: in_out N fs <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, buffer_size, device = 0;
- long frames, counter = 0;
- MY_TYPE *buffer;
- RtAudio *audio = 0;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- buffer_size = 512;
- try {
- audio = new RtAudio(device, chans, device, chans,
- FORMAT, fs, &buffer_size, 8);
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- frames = (long) (fs * TIME);
-
- try {
- buffer = (MY_TYPE *) audio->getStreamBuffer();
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nRunning for " << TIME << " seconds ... fragment_size = " << buffer_size << std::endl;
- while (counter < frames) {
-
- try {
- audio->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
- counter += buffer_size;
- }
-
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
-
- return 0;
-}
diff --git a/tests/play_raw.cpp b/tests/play_raw.cpp
deleted file mode 100644
index 6dd477d..0000000
--- a/tests/play_raw.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/******************************************/
-/*
- play_raw.c
- by Gary P. Scavone, 2001
-
- Play a raw file. It is necessary that the
- file be of the same format as defined below.
- Uses blocking functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-#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;
-#define FORMAT RTAUDIO_SINT24
-#define SCALE 8388607.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;
-*/
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: play_raw N fs file <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate, \n";
- std::cout << " file = the raw file to play,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, buffer_size, count, device = 0;
- long counter = 0;
- MY_TYPE *buffer;
- char *file;
- FILE *fd;
- RtAudio *audio = 0;
-
- // minimal command-line checking
- if (argc != 4 && argc != 5 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- file = argv[3];
- if ( argc == 5 )
- device = (int) atoi(argv[4]);
-
- fd = fopen(file,"rb");
- if (!fd) {
- std::cout << "can't find file!\n";
- exit(0);
- }
-
- // Open the realtime output device
- buffer_size = 512;
- try {
- audio = new RtAudio(device, chans, 0, 0,
- FORMAT, fs, &buffer_size, 2);
- }
- catch (RtError &error) {
- fclose(fd);
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- try {
- buffer = (MY_TYPE *) audio->getStreamBuffer();
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- while (1) {
- count = fread(buffer, chans * sizeof(MY_TYPE), buffer_size, fd);
-
- if (count == buffer_size) {
- try {
- audio->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
- }
- else
- break;
-
- counter += buffer_size;
- }
-
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
- fclose(fd);
-
- return 0;
-}
diff --git a/tests/play_saw.cpp b/tests/play_saw.cpp
deleted file mode 100644
index b99248f..0000000
--- a/tests/play_saw.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/******************************************/
-/*
- play_saw.c
- by Gary P. Scavone, 2001
-
- Play sawtooth waveforms of distinct frequency.
- Takes number of channels and sample rate as
- input arguments. Uses blocking functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-
-/*
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-#define SCALE 2147483647.0
-
-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
-*/
-
-#define BASE_RATE 0.005
-#define TIME 4.0
-
-void usage(void) {
- // Error function in case of incorrect command-line
- // argument specifications.
- std::cout << "\nuseage: play_saw N fs <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, buffer_size, device = 0;
- long frames, counter = 0, i, j;
- MY_TYPE *buffer;
- RtAudio *audio = 0;
- double *data = 0;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- buffer_size = 512;
- try {
- audio = new RtAudio(device, chans, 0, 0,
- FORMAT, fs, &buffer_size, 4);
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- frames = (long) (fs * TIME);
- data = (double *) calloc(chans, sizeof(double));
-
- try {
- buffer = (MY_TYPE *) audio->getStreamBuffer();
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nPlaying for " << TIME << " seconds ... buffer size = " << buffer_size << "." << std::endl;
- while (counter < frames) {
- for (i=0; i<buffer_size; i++) {
- for (j=0; j<chans; j++) {
- buffer[i*chans+j] = (MY_TYPE) (data[j] * SCALE);
- data[j] += BASE_RATE * (j+1+(j*0.1));
- if (data[j] >= 1.0) data[j] -= 2.0;
- }
- }
-
- try {
- audio->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- counter += buffer_size;
- }
-
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
- if (data) free(data);
-
- return 0;
-}
diff --git a/tests/playraw.cpp b/tests/playraw.cpp
new file mode 100644
index 0000000..3b70cdb
--- /dev/null
+++ b/tests/playraw.cpp
@@ -0,0 +1,146 @@
+/******************************************/
+/*
+ playraw.cpp
+ by Gary P. Scavone, 2007
+
+ Play a specified raw file. It is necessary
+ that the file be of the same data format as
+ defined below.
+*/
+/******************************************/
+
+#include "RtAudio.h"
+#include <iostream>
+
+/*
+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_SINT24
+#define SCALE 8388607.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;
+*/
+
+// Platform-dependent sleep routines.
+#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ )
+ #include <windows.h>
+ #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds )
+#else // Unix variants
+ #include <unistd.h>
+ #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
+#endif
+
+void usage( void ) {
+ // Error function in case of incorrect command-line
+ // argument specifications
+ std::cout << "\nuseage: playraw N fs file <device> <channelOffset>\n";
+ std::cout << " where N = number of channels,\n";
+ std::cout << " fs = the sample rate, \n";
+ std::cout << " file = the raw file to play,\n";
+ std::cout << " device = optional device to use (default = 0),\n";
+ std::cout << " and channelOffset = an optional channel offset on the device (default = 0).\n\n";
+ exit(0);
+}
+
+struct OutputData {
+ FILE *fd;
+ unsigned int channels;
+};
+
+// Interleaved buffers
+int output( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ OutputData *oData = (OutputData*) data;
+
+ // In general, it's not a good idea to do file input in the audio
+ // callback function but I'm doing it here because I don't know the
+ // length of the file we are reading.
+ unsigned int count = fread( outputBuffer, oData->channels * sizeof( MY_TYPE ), nBufferFrames, oData->fd);
+ if ( count < nBufferFrames ) {
+ unsigned int bytes = (nBufferFrames - count) * oData->channels * sizeof( MY_TYPE );
+ unsigned int startByte = count * oData->channels * sizeof( MY_TYPE );
+ memset( (char *)(outputBuffer)+startByte, 0, bytes );
+ return 1;
+ }
+
+ return 0;
+}
+
+int main( int argc, char *argv[] )
+{
+ unsigned int channels, fs, bufferFrames, device = 0, offset = 0;
+ char *file;
+
+ // minimal command-line checking
+ if ( argc < 4 || argc > 6 ) usage();
+
+ RtAudio dac;
+ if ( dac.getDeviceCount() < 1 ) {
+ std::cout << "\nNo audio devices found!\n";
+ exit( 0 );
+ }
+
+ channels = (unsigned int) atoi( argv[1]) ;
+ fs = (unsigned int) atoi( argv[2] );
+ file = argv[3];
+ if ( argc > 4 )
+ device = (unsigned int) atoi( argv[4] );
+ if ( argc > 5 )
+ offset = (unsigned int) atoi(argv[5]);
+
+ OutputData data;
+ data.fd = fopen( file, "rb" );
+ if ( !data.fd ) {
+ std::cout << "Unable to find or open file!\n";
+ exit( 0 );
+ }
+
+ // Set our stream parameters for output only.
+ bufferFrames = 512;
+ RtAudio::StreamParameters oParams;
+ oParams.deviceId = device;
+ oParams.nChannels = channels;
+ oParams.firstChannel = offset;
+
+ data.channels = channels;
+ try {
+ dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &output, (void *)&data );
+ dac.startStream();
+ }
+ catch ( RtError& e ) {
+ std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+ goto cleanup;
+ }
+
+ std::cout << "\nPlaying raw file " << file << " (buffer frames = " << bufferFrames << ")." << std::endl;
+ while ( 1 ) {
+ SLEEP( 100 ); // wake every 100 ms to check if we're done
+ if ( dac.isStreamRunning() == false ) break;
+ }
+
+ cleanup:
+ fclose( data.fd );
+ dac.closeStream();
+
+ return 0;
+}
diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp
new file mode 100644
index 0000000..cbe4203
--- /dev/null
+++ b/tests/playsaw.cpp
@@ -0,0 +1,177 @@
+/******************************************/
+/*
+ playsaw.cpp
+ by Gary P. Scavone, 2006
+
+ This program will output sawtooth waveforms
+ of different frequencies on each channel.
+*/
+/******************************************/
+
+#include "RtAudio.h"
+#include <iostream>
+
+/*
+typedef signed long MY_TYPE;
+#define FORMAT RTAUDIO_SINT24
+#define SCALE 2147483647.0
+
+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
+*/
+
+#define BASE_RATE 0.005
+#define TIME 1.0
+
+void usage( void ) {
+ // Error function in case of incorrect command-line
+ // argument specifications
+ std::cout << "\nuseage: playsaw N fs <device> <channelOffset>\n";
+ std::cout << " where N = number of channels,\n";
+ std::cout << " fs = the sample rate,\n";
+ std::cout << " device = optional device to use (default = 0),\n";
+ std::cout << " and channelOffset = an optional channel offset on the device (default = 0).\n\n";
+ exit( 0 );
+}
+
+unsigned int channels;
+RtAudio::StreamOptions options;
+
+//#define USE_INTERLEAVED
+#if defined( USE_INTERLEAVED )
+
+// Interleaved buffers
+int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ unsigned int i, j;
+ extern unsigned int channels;
+ MY_TYPE *buffer = (MY_TYPE *) outputBuffer;
+ double *lastValues = (double *) data;
+
+ if ( status )
+ std::cout << "Stream underflow detected!" << std::endl;
+
+ for ( i=0; i<nBufferFrames; i++ ) {
+ for ( j=0; j<channels; j++ ) {
+ *buffer++ = (MY_TYPE) (lastValues[j] * SCALE);
+ lastValues[j] += BASE_RATE * (j+1+(j*0.1));
+ if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
+ }
+ }
+
+ return 0;
+}
+
+#else // Use non-interleaved buffers
+
+int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ unsigned int i, j;
+ extern unsigned int channels;
+ MY_TYPE *buffer = (MY_TYPE *) outputBuffer;
+ double *lastValues = (double *) data;
+
+ if ( status )
+ std::cout << "Stream underflow detected!" << std::endl;
+
+ double increment;
+ for ( j=0; j<channels; j++ ) {
+ increment = BASE_RATE * (j+1+(j*0.1));
+ for ( i=0; i<nBufferFrames; i++ ) {
+ *buffer++ = (MY_TYPE) (lastValues[j] * SCALE);
+ lastValues[j] += increment;
+ if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
+ }
+ }
+
+ return 0;
+}
+#endif
+
+int main( int argc, char *argv[] )
+{
+ unsigned int bufferFrames, fs, device = 0, offset = 0;
+
+ // minimal command-line checking
+ if (argc < 3 || argc > 5 ) usage();
+
+ RtAudio dac;
+ if ( dac.getDeviceCount() < 1 ) {
+ std::cout << "\nNo audio devices found!\n";
+ exit( 0 );
+ }
+
+ channels = (unsigned int) atoi(argv[1]);
+ fs = (unsigned int) atoi(argv[2]);
+ if ( argc > 3 )
+ device = (unsigned int) atoi(argv[3]);
+ if ( argc > 4 )
+ offset = (unsigned int) atoi(argv[4]);
+
+ double *data;
+ data = (double *) calloc( channels, sizeof( double ) );
+
+ // Let RtAudio print messages to stderr.
+ dac.showWarnings( true );
+
+ // Set our stream parameters for output only.
+ bufferFrames = 256;
+ RtAudio::StreamParameters oParams;
+ oParams.deviceId = device;
+ oParams.nChannels = channels;
+ oParams.firstChannel = offset;
+
+
+ options.flags |= RTAUDIO_HOG_DEVICE;
+#if !defined( USE_INTERLEAVED )
+ options.flags |= RTAUDIO_NONINTERLEAVED;
+#endif
+ try {
+ dac.openStream( &oParams, NULL, FORMAT, fs, &bufferFrames, &saw, (void *)data, &options );
+ dac.startStream();
+ }
+ catch ( RtError& e ) {
+ e.printMessage();
+ goto cleanup;
+ }
+
+ char input;
+ 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 ) {
+ e.printMessage();
+ }
+
+ cleanup:
+ if ( dac.isStreamOpen() ) dac.closeStream();
+ free( data );
+
+ return 0;
+}
diff --git a/tests/info.cpp b/tests/probe.cpp
index 113efb0..e756346 100644
--- a/tests/info.cpp
+++ b/tests/probe.cpp
@@ -1,49 +1,58 @@
/******************************************/
/*
- info.cpp
+ probe.cpp
by Gary P. Scavone, 2001
- Prints audio system/device info.
+ Probe audio system and prints device info.
*/
/******************************************/
#include "RtAudio.h"
#include <iostream>
+#include <map>
-int main(int argc, char *argv[])
+int main()
{
- RtAudio *audio = 0;
- RtAudioDeviceInfo info;
- try {
- audio = new RtAudio();
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
+ // Create an api map.
+ std::map<int, std::string> apiMap;
+ apiMap[RtAudio::MACOSX_CORE] = "OS-X Core Audio";
+ apiMap[RtAudio::WINDOWS_ASIO] = "Windows ASIO";
+ apiMap[RtAudio::WINDOWS_DS] = "Windows Direct Sound";
+ apiMap[RtAudio::UNIX_JACK] = "Jack Client";
+ apiMap[RtAudio::LINUX_ALSA] = "Linux ALSA";
+ apiMap[RtAudio::LINUX_OSS] = "Linux OSS";
+ apiMap[RtAudio::RTAUDIO_DUMMY] = "RtAudio Dummy";
+
+ std::vector< RtAudio::Api > apis;
+ RtAudio :: getCompiledApi( apis );
+
+ std::cout << "\nCompiled APIs:\n";
+ for ( unsigned int i=0; i<apis.size(); i++ )
+ std::cout << " " << apiMap[ apis[i] ] << std::endl;
- int devices = audio->getDeviceCount();
+ RtAudio audio;
+ RtAudio::DeviceInfo info;
+
+ std::cout << "\nCurrent API: " << apiMap[ audio.getCurrentApi() ] << std::endl;
+
+ unsigned int devices = audio.getDeviceCount();
std::cout << "\nFound " << devices << " device(s) ...\n";
- for (int i=1; i<=devices; i++) {
- try {
- info = audio->getDeviceInfo(i);
- }
- catch (RtError &error) {
- error.printMessage();
- break;
- }
+ for (unsigned int i=0; i<devices; i++) {
+ info = audio.getDeviceInfo(i);
std::cout << "\nDevice Name = " << info.name << '\n';
- if (info.probed == false)
+ if ( info.probed == false )
std::cout << "Probe Status = UNsuccessful\n";
else {
std::cout << "Probe Status = Successful\n";
std::cout << "Output Channels = " << info.outputChannels << '\n';
std::cout << "Input Channels = " << info.inputChannels << '\n';
std::cout << "Duplex Channels = " << info.duplexChannels << '\n';
- if (info.isDefault) std::cout << "This is the default device.\n";
- else std::cout << "This is NOT the default device.\n";
+ if ( info.isDefaultOutput ) std::cout << "This is the default output device.\n";
+ else std::cout << "This is NOT the default output device.\n";
+ if ( info.isDefaultInput ) std::cout << "This is the default input device.\n";
+ else std::cout << "This is NOT the default input device.\n";
if ( info.nativeFormats == 0 )
std::cout << "No natively supported data formats(?)!";
else {
@@ -73,6 +82,5 @@ int main(int argc, char *argv[])
}
std::cout << std::endl;
- delete audio;
return 0;
}
diff --git a/tests/record.cpp b/tests/record.cpp
new file mode 100644
index 0000000..f43db19
--- /dev/null
+++ b/tests/record.cpp
@@ -0,0 +1,169 @@
+/******************************************/
+/*
+ record.cpp
+ by Gary P. Scavone, 2007
+
+ This program records audio from a device and writes it to a
+ header-less binary file. Use the 'playraw', with the same
+ parameters and format settings, to playback the audio.
+*/
+/******************************************/
+
+#include "RtAudio.h"
+#include <iostream>
+
+/*
+typedef char MY_TYPE;
+#define FORMAT RTAUDIO_SINT8
+
+typedef signed short MY_TYPE;
+#define FORMAT RTAUDIO_SINT16
+
+typedef signed long MY_TYPE;
+#define FORMAT RTAUDIO_SINT24
+
+typedef signed long MY_TYPE;
+#define FORMAT RTAUDIO_SINT32
+*/
+
+typedef float MY_TYPE;
+#define FORMAT RTAUDIO_FLOAT32
+
+/*
+typedef double MY_TYPE;
+#define FORMAT RTAUDIO_FLOAT64
+*/
+
+// Platform-dependent sleep routines.
+#if defined( __WINDOWS_ASIO__ ) || defined( __WINDOWS_DS__ )
+ #include <windows.h>
+ #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds )
+#else // Unix variants
+ #include <unistd.h>
+ #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
+#endif
+
+void usage( void ) {
+ // Error function in case of incorrect command-line
+ // argument specifications
+ std::cout << "\nuseage: record N fs <duration> <device> <channelOffset>\n";
+ std::cout << " where N = number of channels,\n";
+ std::cout << " fs = the sample rate,\n";
+ std::cout << " duration = optional time in seconds to record (default = 2.0),\n";
+ std::cout << " device = optional device to use (default = 0),\n";
+ std::cout << " and channelOffset = an optional channel offset on the device (default = 0).\n\n";
+ exit( 0 );
+}
+
+struct InputData {
+ MY_TYPE* buffer;
+ unsigned long bufferBytes;
+ unsigned long totalFrames;
+ unsigned long frameCounter;
+ unsigned int channels;
+};
+
+// Interleaved buffers
+int input( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ InputData *iData = (InputData *) data;
+
+ // Simply copy the data to our allocated buffer.
+ unsigned int frames = nBufferFrames;
+ if ( iData->frameCounter + nBufferFrames > iData->totalFrames ) {
+ frames = iData->totalFrames - iData->frameCounter;
+ iData->bufferBytes = frames * iData->channels * sizeof( MY_TYPE );
+ }
+
+ unsigned long offset = iData->frameCounter * iData->channels;
+ memcpy( iData->buffer+offset, inputBuffer, iData->bufferBytes );
+ iData->frameCounter += frames;
+
+ if ( iData->frameCounter >= iData->totalFrames ) return 2;
+ return 0;
+}
+
+int main( int argc, char *argv[] )
+{
+ unsigned int channels, fs, bufferFrames, device = 0, offset = 0;
+ double time = 2.0;
+ FILE *fd;
+
+ // minimal command-line checking
+ if ( argc < 3 || argc > 6 ) usage();
+
+ RtAudio adc;
+ if ( adc.getDeviceCount() < 1 ) {
+ std::cout << "\nNo audio devices found!\n";
+ exit( 0 );
+ }
+
+ channels = (unsigned int) atoi( argv[1] );
+ fs = (unsigned int) atoi( argv[2] );
+ if ( argc > 3 )
+ time = (double) atof( argv[3] );
+ if ( argc > 4 )
+ device = (unsigned int) atoi( argv[4] );
+ if ( argc > 5 )
+ offset = (unsigned int) atoi( argv[5] );
+
+ // Let RtAudio print messages to stderr.
+ adc.showWarnings( true );
+
+ // Set our stream parameters for input only.
+ bufferFrames = 512;
+ RtAudio::StreamParameters iParams;
+ iParams.deviceId = device;
+ iParams.nChannels = channels;
+ iParams.firstChannel = offset;
+
+ InputData data;
+ data.buffer = 0;
+ try {
+ adc.openStream( NULL, &iParams, FORMAT, fs, &bufferFrames, &input, (void *)&data );
+ }
+ catch ( RtError& e ) {
+ std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+ goto cleanup;
+ }
+
+ data.bufferBytes = bufferFrames * channels * sizeof( MY_TYPE );
+ data.totalFrames = (unsigned long) (fs * time);
+ data.frameCounter = 0;
+ data.channels = channels;
+ unsigned long totalBytes;
+ totalBytes = data.totalFrames * channels * sizeof( MY_TYPE );
+
+ // Allocate the entire data buffer before starting stream.
+ data.buffer = (MY_TYPE*) malloc( totalBytes );
+ if ( data.buffer == 0 ) {
+ std::cout << "Memory allocation error ... quitting!\n";
+ goto cleanup;
+ }
+
+ try {
+ adc.startStream();
+ }
+ catch ( RtError& e ) {
+ std::cout << '\n' << e.getMessage() << '\n' << std::endl;
+ goto cleanup;
+ }
+
+ std::cout << "\nRecording for " << time << " seconds ... writing file 'record.raw' (buffer frames = " << bufferFrames << ")." << std::endl;
+ while ( 1 ) {
+ SLEEP( 100 ); // wake every 100 ms to check if we're done
+ if ( adc.isStreamRunning() == false ) break;
+ }
+
+ // Now write the entire data to the file.
+ fd = fopen( "record.raw", "wb" );
+ fwrite( data.buffer, sizeof( MY_TYPE ), data.totalFrames * channels, fd );
+ fclose(fd);
+
+ cleanup:
+ if ( adc.isStreamOpen() ) adc.closeStream();
+ if ( data.buffer ) free( data.buffer );
+
+ return 0;
+}
diff --git a/tests/record_raw.cpp b/tests/record_raw.cpp
deleted file mode 100644
index 3a207f9..0000000
--- a/tests/record_raw.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/******************************************/
-/*
- record_raw.c
- by Gary P. Scavone, 2001
-
- Records from default input. Takes
- number of channels and sample rate
- as input arguments. Uses blocking calls.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-#include <stdio.h>
-
-/*
-typedef char MY_TYPE;
-#define FORMAT RTAUDIO_SINT8
-
-typedef signed short MY_TYPE;
-#define FORMAT RTAUDIO_SINT16
-
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT32
-*/
-
-typedef float MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT32
-
-/*
-typedef double MY_TYPE;
-#define FORMAT RTAUDIO_FLOAT64
-*/
-
-#define TIME 2.0
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: record_raw N fs <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, buffer_size, device = 0;
- long frames, counter = 0;
- MY_TYPE *buffer;
- FILE *fd;
- RtAudio *audio = 0;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- buffer_size = 512;
- try {
- audio = new RtAudio(0, 0, device, chans,
- FORMAT, fs, &buffer_size, 8);
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- fd = fopen("test.raw","wb");
- frames = (long) (fs * TIME);
-
- try {
- buffer = (MY_TYPE *) audio->getStreamBuffer();
- audio->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nRecording for " << TIME << " seconds ... writing file test.raw (buffer size = " << buffer_size << ")." << std::endl;
- while (counter < frames) {
-
- try {
- audio->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- fwrite(buffer, sizeof(MY_TYPE), chans * buffer_size, fd);
- counter += buffer_size;
- }
-
- try {
- audio->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- audio->closeStream();
- delete audio;
- fclose(fd);
-
- return 0;
-}
diff --git a/tests/testall.cpp b/tests/testall.cpp
new file mode 100644
index 0000000..af14809
--- /dev/null
+++ b/tests/testall.cpp
@@ -0,0 +1,221 @@
+/******************************************/
+/*
+ testall.cpp
+ by Gary P. Scavone, 2007
+
+ This program will make a variety of calls
+ to extensively test RtAudio functionality.
+*/
+/******************************************/
+
+#include "RtAudio.h"
+#include <iostream>
+
+#define BASE_RATE 0.005
+#define TIME 1.0
+
+void usage( void ) {
+ // Error function in case of incorrect command-line
+ // argument specifications
+ std::cout << "\nuseage: testall N fs <device> <channelOffset>\n";
+ std::cout << " where N = number of channels,\n";
+ std::cout << " fs = the sample rate,\n";
+ std::cout << " device = optional device to use (default = 0),\n";
+ std::cout << " and channelOffset = an optional channel offset on the device (default = 0).\n\n";
+ exit( 0 );
+}
+
+unsigned int channels;
+
+// Interleaved buffers
+int sawi( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ unsigned int i, j;
+ extern unsigned int channels;
+ double *buffer = (double *) outputBuffer;
+ double *lastValues = (double *) data;
+
+ if ( status )
+ std::cout << "Stream underflow detected!" << std::endl;
+
+ for ( i=0; i<nBufferFrames; i++ ) {
+ for ( j=0; j<channels; j++ ) {
+ *buffer++ = (double) lastValues[j];
+ lastValues[j] += BASE_RATE * (j+1+(j*0.1));
+ if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
+ }
+ }
+
+ return 0;
+}
+
+// Non-interleaved buffers
+int sawni( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ unsigned int i, j;
+ extern unsigned int channels;
+ double *buffer = (double *) outputBuffer;
+ double *lastValues = (double *) data;
+
+ if ( status )
+ std::cout << "Stream underflow detected!" << std::endl;
+
+ float increment;
+ for ( j=0; j<channels; j++ ) {
+ increment = BASE_RATE * (j+1+(j*0.1));
+ for ( i=0; i<nBufferFrames; i++ ) {
+ *buffer++ = (double) lastValues[j];
+ lastValues[j] += increment;
+ if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0;
+ }
+ }
+
+ return 0;
+}
+
+int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
+ double streamTime, RtAudioStreamStatus status, void *data )
+{
+ // Since the number of input and output channels is equal, we can do
+ // a simple buffer copy operation here.
+ if ( status ) std::cout << "Stream over/underflow detected." << std::endl;
+
+ unsigned long *bytes = (unsigned long *) data;
+ memcpy( outputBuffer, inputBuffer, *bytes );
+ return 0;
+}
+
+int main( int argc, char *argv[] )
+{
+ unsigned int bufferFrames, fs, device = 0, offset = 0;
+ char input;
+
+ // minimal command-line checking
+ if (argc < 3 || argc > 5 ) usage();
+
+ RtAudio dac;
+ if ( dac.getDeviceCount() < 1 ) {
+ std::cout << "\nNo audio devices found!\n";
+ exit( 0 );
+ }
+
+ channels = (unsigned int) atoi(argv[1]);
+ fs = (unsigned int) atoi(argv[2]);
+ if ( argc > 3 )
+ device = (unsigned int) atoi(argv[3]);
+ if ( argc > 4 )
+ offset = (unsigned int) atoi(argv[4]);
+
+ double *data;
+ data = (double *) calloc( channels, sizeof( double ) );
+
+ // Let RtAudio print messages to stderr.
+ dac.showWarnings( true );
+
+ // Set our stream parameters for output only.
+ bufferFrames = 256;
+ RtAudio::StreamParameters oParams, iParams;
+ oParams.deviceId = device;
+ oParams.nChannels = channels;
+ oParams.firstChannel = offset;
+
+ RtAudio::StreamOptions options;
+ options.flags = RTAUDIO_HOG_DEVICE;
+ try {
+ dac.openStream( &oParams, NULL, RTAUDIO_FLOAT64, fs, &bufferFrames, &sawi, (void *)data, &options );
+ std::cout << "\nStream latency = " << dac.getStreamLatency() << std::endl;
+
+ // Start the stream
+ dac.startStream();
+ std::cout << "\nPlaying ... press <enter> to stop.\n";
+ std::cin.get( input );
+
+ // Stop the stream
+ dac.stopStream();
+
+ // Restart again
+ std::cout << "Press <enter> to restart.\n";
+ std::cin.get( input );
+ dac.startStream();
+
+ // Test abort function
+ std::cout << "Playing again ... press <enter> to abort.\n";
+ std::cin.get( input );
+ dac.abortStream();
+
+ // Restart another time
+ std::cout << "Press <enter> to restart again.\n";
+ std::cin.get( input );
+ dac.startStream();
+
+ std::cout << "Playing again ... press <enter> to close the stream.\n";
+ std::cin.get( input );
+ }
+ catch ( RtError& e ) {
+ e.printMessage();
+ goto cleanup;
+ }
+
+ if ( dac.isStreamOpen() ) dac.closeStream();
+
+ // Test non-interleaved functionality
+ options.flags = RTAUDIO_NONINTERLEAVED;
+ try {
+ dac.openStream( &oParams, NULL, RTAUDIO_FLOAT64, fs, &bufferFrames, &sawni, (void *)data, &options );
+
+ std::cout << "Press <enter> to start non-interleaved playback.\n";
+ std::cin.get( input );
+
+ // Start the stream
+ dac.startStream();
+ std::cout << "\nPlaying ... press <enter> to stop.\n";
+ std::cin.get( input );
+ }
+ catch ( RtError& e ) {
+ e.printMessage();
+ goto cleanup;
+ }
+
+ if ( dac.isStreamOpen() ) dac.closeStream();
+
+ // Now open a duplex stream.
+ unsigned int bufferBytes;
+ iParams.deviceId = device;
+ iParams.nChannels = channels;
+ iParams.firstChannel = offset;
+ options.flags = RTAUDIO_NONINTERLEAVED;
+ try {
+ dac.openStream( &oParams, &iParams, RTAUDIO_SINT32, fs, &bufferFrames, &inout, (void *)&bufferBytes, &options );
+
+ bufferBytes = bufferFrames * channels * 4;
+
+ std::cout << "Press <enter> to start duplex operation.\n";
+ std::cin.get( input );
+
+ // Start the stream
+ dac.startStream();
+ std::cout << "\nRunning ... press <enter> to stop.\n";
+ std::cin.get( input );
+
+ // Stop the stream
+ dac.stopStream();
+ std::cout << "\nStopped ... press <enter> to restart.\n";
+ std::cin.get( input );
+
+ // Restart the stream
+ dac.startStream();
+ std::cout << "\nRunning ... press <enter> to stop.\n";
+ std::cin.get( input );
+ }
+ catch ( RtError& e ) {
+ e.printMessage();
+ }
+
+ cleanup:
+ if ( dac.isStreamOpen() ) dac.closeStream();
+ free( data );
+
+ return 0;
+}
diff --git a/tests/twostreams.cpp b/tests/twostreams.cpp
deleted file mode 100644
index 17badd0..0000000
--- a/tests/twostreams.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/******************************************/
-/*
- twostreams.cpp
- by Gary P. Scavone, 2001
-
- Test executable for audio playback, recording,
- duplex operation, stopping, starting, and
- aborting operations. Takes number of channels
- and sample rate as input arguments. Runs input
- and output through two separate instances of RtAudio.
- Uses blocking functionality.
-*/
-/******************************************/
-
-#include "RtAudio.h"
-#include <iostream>
-
-/*
-typedef signed long MY_TYPE;
-#define FORMAT RTAUDIO_SINT24
-#define SCALE 2147483647.0
-
-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
-*/
-
-#define BASE_RATE 0.005
-#define TIME 2.0
-
-void usage(void) {
- /* Error function in case of incorrect command-line
- argument specifications
- */
- std::cout << "\nuseage: twostreams N fs <device>\n";
- std::cout << " where N = number of channels,\n";
- std::cout << " fs = the sample rate,\n";
- std::cout << " and device = the device to use (default = 0).\n\n";
- exit(0);
-}
-
-int main(int argc, char *argv[])
-{
- int chans, fs, buffer_size, device = 0;
- long frames, counter = 0, i, j;
- MY_TYPE *buffer1, *buffer2;
- RtAudio *stream1 = 0, *stream2 = 0;
- FILE *fd;
- double *data = 0;
-
- // minimal command-line checking
- if (argc != 3 && argc != 4 ) usage();
-
- chans = (int) atoi(argv[1]);
- fs = (int) atoi(argv[2]);
- if ( argc == 4 )
- device = (int) atoi(argv[3]);
-
- // Open the realtime output device
- buffer_size = 512;
- try {
- stream1 = new RtAudio(device, chans, 0, 0,
- FORMAT, fs, &buffer_size, 8);
- }
- catch (RtError &error) {
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- try {
- stream2 = new RtAudio(0, 0, device, chans,
- FORMAT, fs, &buffer_size, 8);
- }
- catch (RtError &error) {
- delete stream1;
- error.printMessage();
- exit(EXIT_FAILURE);
- }
-
- try {
- buffer1 = (MY_TYPE *) stream1->getStreamBuffer();
- buffer2 = (MY_TYPE *) stream2->getStreamBuffer();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- frames = (long) (fs * TIME);
- data = (double *) calloc(chans, sizeof(double));
-
- try {
- stream1->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- std::cout << "\nStarting sawtooth playback stream for " << TIME << " seconds." << std::endl;
- while (counter < frames) {
- for (i=0; i<buffer_size; i++) {
- for (j=0; j<chans; j++) {
- buffer1[i*chans+j] = (MY_TYPE) (data[j] * SCALE);
- data[j] += BASE_RATE * (j+1+(j*0.1));
- if (data[j] >= 1.0) data[j] -= 2.0;
- }
- }
-
- try {
- stream1->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- counter += buffer_size;
- }
-
- std::cout << "\nStopping playback stream." << std::endl;
- try {
- stream1->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- fd = fopen("test.raw","wb");
-
- try {
- stream2->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- counter = 0;
- std::cout << "\nStarting recording stream for " << TIME << " seconds." << std::endl;
- while (counter < frames) {
-
- try {
- stream2->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- fwrite(buffer2, sizeof(MY_TYPE), chans * buffer_size, fd);
- counter += buffer_size;
- }
-
- fclose(fd);
- std::cout << "\nAborting recording." << std::endl;
-
- try {
- stream2->abortStream();
- stream1->startStream();
- stream2->startStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- counter = 0;
- std::cout << "\nStarting playback and record streams (quasi-duplex) for " << TIME << " seconds." << std::endl;
- while (counter < frames) {
-
- try {
- stream2->tickStream();
- memcpy(buffer1, buffer2, sizeof(MY_TYPE) * chans * buffer_size);
- stream1->tickStream();
- }
- catch (RtError &error) {
- error.printMessage();
- goto cleanup;
- }
-
- counter += buffer_size;
- }
-
- std::cout << "\nStopping both streams." << std::endl;
- try {
- stream1->stopStream();
- stream2->stopStream();
- }
- catch (RtError &error) {
- error.printMessage();
- }
-
- cleanup:
- stream1->closeStream();
- stream2->closeStream();
- delete stream1;
- delete stream2;
- if (data) free(data);
-
- return 0;
-}