﻿
Index: src/Flow/Networks/JACKNetworkPlayer.cxx
===================================================================
--- src/Flow/Networks/JACKNetworkPlayer.cxx	(révision 10958)
+++ src/Flow/Networks/JACKNetworkPlayer.cxx	(copie de travail)
@@ -298,7 +298,7 @@
 	_outgoingJackConnections.clear();
 }
 
-void JACKNetworkPlayer::AutoConnectPorts()
+void JACKNetworkPlayer::AutoConnectPorts(int in, int out)
 {
 	//Automatically connect the ports to external jack ports
 	std::cout << "Automatically connecting to JACK input and output ports" << std::endl;
@@ -318,17 +318,17 @@
 		//Double iterate AudioSources & found JACK out ports
 		for ( SourceJackBindings::iterator it= _sourceJackBindings.begin(); it!=_sourceJackBindings.end(); it++)
 		{
-			std::cout << "- Connecting " << portnames[i] << " -> " 
+			std::cout << "- Connecting " << portnames[i+in] << " -> " 
 				<< it->PortName() << std::endl;
 
-			if ( jack_connect( _jackClient, portnames[i], 
+			if ( jack_connect( _jackClient, portnames[i+in], 
 						it->PortName() ) !=0 )
 			{
 				std::cerr << " -WARNING: couldn't connect" << std::endl;
 			}
 		
 			i++;
-			if (portnames[i]==NULL) break;
+			if (portnames[i+in]==NULL) break;
 		}	
 	}		
 	free(portnames);
@@ -349,16 +349,16 @@
 		for (SinkJackBindings::iterator it= _sinkJackBindings.begin(); it!=_sinkJackBindings.end(); it++)
 		{
 			std::cout << "- Connecting "<< it->PortName()
-				<< " -> " << portnames[i] << std::endl;
+				<< " -> " << portnames[i+out] << std::endl;
 
 			if ( jack_connect( _jackClient, it->PortName(),
-						portnames[i]) != 0)
+						portnames[i+out]) != 0)
 			{
 				std::cerr << " -WARNING: couldn't connect" << std::endl;
 			}
 		
 			i++;
-			if (portnames[i]==NULL) break;
+			if (portnames[i+out]==NULL) break;
 		}
 	}			
 	free(portnames);
Index: src/Flow/Networks/JACKNetworkPlayer.hxx
===================================================================
--- src/Flow/Networks/JACKNetworkPlayer.hxx	(révision 10958)
+++ src/Flow/Networks/JACKNetworkPlayer.hxx	(copie de travail)
@@ -82,7 +82,7 @@
 	virtual void Init();
 	virtual unsigned BackendBufferSize() 
 	{
-		std::cout << "JACKNetworkPlayer::BackendBufferSize" << std::endl;
+	  std::cout << "JACKNetworkPlayer::BackendBufferSize " << _jackBufferSize << std::endl;
 		return _jackBufferSize; 
 	}
 	virtual unsigned BackendSampleRate() { return _jackSampleRate; }
@@ -95,8 +95,7 @@
 	void StoreConnections();
 	void RestoreConnections();
 	
-	
-	void AutoConnectPorts();
+	void AutoConnectPorts(int in=0, int out=0); // in and out are starting ports for input output
 };
 } //namespace CLAM
 


