Commit 70c03f30 authored by Jonas Stienen's avatar Jonas Stienen

More Portaudio infos and fixing optional parameter read error

parent e9e6b740
......@@ -149,7 +149,7 @@ int main( int argc, char* argv[] )
int iBlockLength = ITAPortaudioInterface::GetPreferredBufferSize();
if( argc > 3 )
{
iBlockLength = int( *argv[ 3 ] );
iBlockLength = atoi( argv[ 3 ] );
}
// Start audio streaming
......@@ -157,8 +157,9 @@ int main( int argc, char* argv[] )
ITAPortaudioInterface oITAPA( dSamplingRate, iBlockLength );
int iPortaudioDeviceID = oITAPA.GetDefaultOutputDevice();
if( argc > 4 )
iPortaudioDeviceID = int( *argv[ 4 ] );
iPortaudioDeviceID = atoi( argv[ 4 ] );
std::cout << "Attempting to initialize Portaudio device with ID " << iPortaudioDeviceID << std::endl;
if( ( iError = oITAPA.Initialize( iPortaudioDeviceID ) ) != ITAPortaudioInterface::ITA_PA_NO_ERROR )
{
std::cerr << "Could not initialize Portaudio, encountered error: " << ITAPortaudioInterface::GetErrorCodeString( iError ) << std::endl;
......
bin\ita_convoi.exe data\lang_short.wav data\rir_train_30s.wav 1 256
\ No newline at end of file
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