Commit 28ad0de1 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding application ita_whad (ita which audio device to extract information on...

Adding application ita_whad (ita which audio device to extract information on audio devices using ASIO and/or Portaudio)
parent ab3bba04
......@@ -98,6 +98,11 @@ vista_create_default_info_file( ITADataSources )
set_property( TARGET ITADataSources PROPERTY FOLDER "ITACoreLibs" )
# apps
set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/apps/ita_whad" )
# tests
set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
cmake_minimum_required( VERSION 2.8 )
if( NOT ITADATASOURCES_COMMON_BUILD )
project( ita_whad )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
endif()
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
if( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
add_definitions( "-DITA_WHAD_WITH_ASIO" )
endif( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
if( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( "-DITA_WHAD_WITH_PORTAUDIO" )
endif( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( -DITA_DATA_SOURCES_DLL )
add_executable( ita_whad main.cpp )
target_link_libraries( ita_whad ${VISTA_USE_PACKAGE_LIBRARIES} )
vista_configure_app( ita_whad )
vista_install( ita_whad )
vista_create_default_info_file( ita_whad )
set_property( TARGET ita_whad PROPERTY FOLDER "ITAApps/ITADataSources" )
//#include <conio.h>
#include <iostream>
#include <stdio.h>
#include <string>
#include <ITAAsioInterface.h>
using namespace std;
int main( int argc, char* argv[] )
{
cout << "ita_whad - ITA's which audio devices application" << endl;
cout << " ... lists all available audio devices and available properties." << endl << endl;
#ifdef ITA_WHAD_WITH_ASIO
cout << "ASIO support: yes" << endl;
#else
cout << "ASIO support: no" << endl;
#endif // ITA_WHAD_WITH_ASIO
#ifdef ITA_WHAD_WITH_PORTAUDIO
cout << "Portaudio support: yes" << endl;
#else
cout << "Portaudio support: no" << endl;
#endif // ITA_WHAD_WITH_PORTAUDIO
cout << endl;
#ifdef ITA_WHAD_WITH_ASIO
string sFileName = "ita_whad_asio.txt";
FILE* file = fopen( sFileName.c_str(), "w" );
ITAsioInitializeLibrary();
long lDrivers = ITAsioGetNumDrivers();
if( lDrivers == 0 )
cerr << "Warning: no ASIO drivers found." << endl;
for( long i = 0; i < lDrivers; i++ )
{
cout << "[" << i+1 << "] \"" << ITAsioGetDriverName(i) << "\"" << endl;
}
ITAsioFinalizeLibrary();
fclose( file );
#endif // ITA_WHAD_WITH_ASIO
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment