Commit f53dfeda authored by Jonas Stienen's avatar Jonas Stienen
Browse files

Fixing merge problem

parent 9a378382
...@@ -4,25 +4,19 @@ ...@@ -4,25 +4,19 @@
#include <stdio.h> #include <stdio.h>
#include <string> #include <string>
<<<<<<< HEAD
#ifndef _WIN32_WINNT // @todo: remove #ifndef _WIN32_WINNT // @todo: remove
#define _WIN32_WINNT 0x0500 #define _WIN32_WINNT 0x0500
#endif #endif
#include <windows.h> #include <windows.h>
int test( const char* pszDriverName ) int test( const char* pszDriverName )
{ {
=======
#include <windows.h>
int test( const char* pszDriverName ) {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
ITAsioInitializeLibrary(); ITAsioInitializeLibrary();
// Treiber anzeigen // Treiber anzeigen
long lDrivers = ITAsioGetNumDrivers(); long lDrivers = ITAsioGetNumDrivers();
<<<<<<< HEAD
if( lDrivers > 0 ) if( lDrivers > 0 )
{ {
printf( "Folgende ASIO-Treiber wurden gefunden:\n\n" ); printf( "Folgende ASIO-Treiber wurden gefunden:\n\n" );
...@@ -33,15 +27,6 @@ int test( const char* pszDriverName ) { ...@@ -33,15 +27,6 @@ int test( const char* pszDriverName ) {
} }
else else
{ {
=======
if( lDrivers > 0 ) {
printf( "Folgende ASIO-Treiber wurden gefunden:\n\n" );
for( long i = 0; i < lDrivers; i++ ) {
printf( "\t[%d]\t%s\n", i + 1, ITAsioGetDriverName( i ) );
}
}
else {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
printf( "Keine ASIO-Treiber gefunden!\n" ); printf( "Keine ASIO-Treiber gefunden!\n" );
return 0; return 0;
} }
...@@ -49,7 +34,6 @@ int test( const char* pszDriverName ) { ...@@ -49,7 +34,6 @@ int test( const char* pszDriverName ) {
// Treiber initialisieren // Treiber initialisieren
printf( "Initialisiere Treiber \"%s\"\n", pszDriverName ); printf( "Initialisiere Treiber \"%s\"\n", pszDriverName );
ASIOError ae = ITAsioInitializeDriver( pszDriverName ); ASIOError ae = ITAsioInitializeDriver( pszDriverName );
<<<<<<< HEAD
if( ae == ASE_OK ) if( ae == ASE_OK )
{ {
printf( "Initialisierung erfolgreich!" ); printf( "Initialisierung erfolgreich!" );
...@@ -58,15 +42,7 @@ int test( const char* pszDriverName ) { ...@@ -58,15 +42,7 @@ int test( const char* pszDriverName ) {
else else
{ {
printf( "Initialisierung fehlgeschlagen (errorcode %d: %s)\n", ae, ITAsioGetErrorStr( ae ) ); printf( "Initialisierung fehlgeschlagen (errorcode %d: %s)\n", ae, ITAsioGetErrorStr( ae ) );
=======
if( ae == ASE_OK ) {
printf( "Initialisierung erfolgreich!" );
ITAsioFinalizeDriver();
}
else {
printf( "Initialisierung fehlgeschlagen (errorcode %d: %s)\n",
ae, ITAsioGetErrorStr( ae ) );
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
return -1; return -1;
} }
...@@ -75,63 +51,44 @@ int test( const char* pszDriverName ) { ...@@ -75,63 +51,44 @@ int test( const char* pszDriverName ) {
return 0; return 0;
} }
<<<<<<< HEAD
void ThreadProc( void* pParam ) void ThreadProc( void* pParam )
{ {
=======
void ThreadProc( void* pParam ) {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
printf( "Thread ist gestartet!\n" ); printf( "Thread ist gestartet!\n" );
// COM initialisieren (Appartment) // COM initialisieren (Appartment)
//CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); //CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
<<<<<<< HEAD
if( test( ( const char* ) pParam ) != 0 ) if( test( ( const char* ) pParam ) != 0 )
{ {
=======
if( test( ( const char* ) pParam ) != 0 ) {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
//CoUninitialize(); //CoUninitialize();
} }
_endthread(); _endthread();
} }
<<<<<<< HEAD
int main( int argc, char* argv[] ) int main( int argc, char* argv[] )
{ {
=======
int main( int argc, char* argv[] ) {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
// COM initialisieren (Appartment) // COM initialisieren (Appartment)
//CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); //CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
<<<<<<< HEAD
if( argc != 2 ) if( argc != 2 )
{ {
=======
if( argc != 2 ) {
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
fprintf( stderr, "Syntax: ThreadInit TREIBERNUMMER\n" ); fprintf( stderr, "Syntax: ThreadInit TREIBERNUMMER\n" );
return 255; return 255;
} }
bool bThreaded = true; bool bThreaded = true;
if( bThreaded ) { if( bThreaded )
{
HANDLE hThread = ( HANDLE ) _beginthread( ThreadProc, 0, argv[ 1 ] ); HANDLE hThread = ( HANDLE ) _beginthread( ThreadProc, 0, argv[ 1 ] );
WaitForSingleObject( hThread, INFINITE ); WaitForSingleObject( hThread, INFINITE );
} }
else else
<<<<<<< HEAD
{ {
test( argv[ 1 ] ); test( argv[ 1 ] );
} }
=======
test( argv[ 1 ] );
>>>>>>> 87b82f9a45babe4a44bc6ff4bdb51601b26b3576
//CoUninitialize(); //CoUninitialize();
......
Supports Markdown
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