Commit 2b969e3d authored by Anne's avatar Anne
Browse files

multi channel tests

parent 808c512c
......@@ -7,6 +7,7 @@
#include <ITAException.h>
#include <ITAFileDatasource.h>
#include <ITAStreamProbe.h>
#include <ITAStreamPatchbay.h>
using namespace std;
......@@ -17,13 +18,28 @@ static int g_iBufferSize = 1024;
int main( int , char** )
{
CITANetAudioStream oNetAudioStream( 1, g_dSampleRate, g_iBufferSize, 100 * g_iBufferSize );
CITANetAudioStream oNetAudioStream( 10, g_dSampleRate, g_iBufferSize, 100 * g_iBufferSize );
ITAStreamProbe oProbe( &oNetAudioStream, "out_gutentag.wav" );
ITAStreamMultiplier1N oMultiplier( &oProbe, 2 );
ITAStreamPatchbay oPatchbay( g_dSampleRate, g_iBufferSize );
oPatchbay.AddInput( &oProbe );
ITADatasource* pOutput;
oPatchbay.AddOutput( 1 );
for ( int n = 0; n<1; n++ )
{
if ( oProbe.GetNumberOfChannels( ) > 1 )
oPatchbay.ConnectChannels( 0, n % ( oProbe.GetNumberOfChannels( ) - 1 ), 0, n );
else
oPatchbay.ConnectChannels( 0, 0, 0, n );
}
pOutput = oPatchbay.GetOutputDatasource( 0 );
std::cout << "NumOutChannel " << pOutput->GetNumberOfChannels() << std::endl;
//ITAStreamMultiplier1N oMultiplier( &oProbe, 2 );
ITAPortaudioInterface ITAPA( g_dSampleRate, g_iBufferSize );
ITAPA.Initialize();
ITAPA.SetPlaybackDatasource( &oMultiplier );
ITAPA.SetPlaybackDatasource( pOutput );
ITAPA.Open();
ITAPA.Start();
......
......@@ -4,6 +4,7 @@
#include <ITANetAudioStreamingServer.h>
#include <ITANetAudioServer.h>
#include <ITAStreamFunctionGenerator.h>
#include <ITAStreamMultiplier1N.h>
#include <ITAFileDatasource.h>
using namespace std;
......@@ -17,8 +18,9 @@ int main( int , char** )
{
ITAStreamFunctionGenerator oGenerator( 2, g_dSampleRate, g_iBlockLength, ITAStreamFunctionGenerator::SINE, 456.78f, 0.81f, true );
ITAFileDatasource oDatei("gershwin-mono.wav", g_iBlockLength);
ITAStreamMultiplier1N oMuliplier( &oDatei, 10 );
CITANetAudioStreamingServer oStreamingServer;
oStreamingServer.SetInputStream(&oDatei);
oStreamingServer.SetInputStream( &oMuliplier );
cout << "Starting server and waiting for connections on '" << g_sServerName << "' on port " << g_iServerPort << endl;
oStreamingServer.Start( g_sServerName, g_iServerPort );
......
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