Browse Source

Add empty NetAdapter codeblocks project

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2747 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
moret 17 years ago
parent
commit
4505373ea8
5 changed files with 77 additions and 13 deletions
  1. +9
    -6
      Readme_NetJack2.txt
  2. +9
    -5
      common/JackNetDriver.cpp
  3. +2
    -2
      windows/Readme.txt
  4. +1
    -0
      windows/Setup/jack.ci
  5. +56
    -0
      windows/jack_netadapter.cbp

+ 9
- 6
Readme_NetJack2.txt View File

@@ -3,7 +3,7 @@ NetJack for Jackmp
-------------------------------
This branche includes a version of netjack designed for jackmp.
This prerelease is far from being complete and doesn't include some of the features proposed by netjack (no transport yet).
This prerelease is far from being complete and doesn't include some of the features proposed by netjack (transport isn't completely working yet).
Indeed, the original concept has been completely redesigned to better fit to the jackmp architecture, but also in order to provide additional capabilities, and ultimately a greater robustness.
This document describes the major changes between those two systems, then a simple how-to for setting up a basic usage of 'netjackmp'.
@@ -51,7 +51,6 @@ Current limitations
The netjackmp's development has just started. This prerelease is operational, but involve some serious limitations :
- You can't set the bitdepth of the transmitted audio samples. Floating point values are used for now. The possibility to use 16 or 24bits data will be included soon, like in netjack. It's important to notice that change the bitdepth id very expensive in processing ressources (because it is a sample to sample operation).
- The 'inter-slave' communication is not optimized yet. If you connect one slave to another, the network streams go through the master. While sending network addresses to the slaves when they are inter-jack-connected, we could make the slave possibly independant of the master (except for the synchronization, sent over the network). This is the next step of the netjackmp development.
- Because of the current development, the parametering of the whole system is minimalistic.
- Unlike netjack, this version doesn't include transport, this is naturally planned for the fully operational version.
- The 'Audio Adapter' is not completely working, there are several improvements to do.
@@ -71,14 +70,18 @@ Then, load the network manager using jack_load :
'jack_load netmanager'
This will load the internal client, which will wait for an available slave (see the message window on qjackctl - or the console output).
If you want to listen to a specific multicast socket, you can add some options. To spicify a complete command line, you can use :
'jack_load netmanager -i"-a xxx.xxx.xxx.xxx -p udp_port"'
If you set another multicast address or port, you have to set the same on the slave's side. The default value should be working in many cases.
On the slave, just launch a new jack server using :
'jackd -R -S -d net'
'jackd -R -d net'
The '-S' (synchronous) option is mandatory. Indeed, the jack server isn't able to deal with the current cycle produced audio data because when the 'send' is called, data are not necessarily already available. So in a given 'n' cycle, the server will send the data produced at the 'n-1' cycle.
In this case, there is no effect on latency because all the subcycles of the slave (the previous 4 subcycles for instance) are run in the given master's cycle.
You can specify some options, like '-n name' (will give a name to the slave, default is the network hostname), '-C input_ports' (the number of master-->slave channels), '-P output_ports' (the number of slave-->master channels), default is 2 ; or '-i midi_in_ports' and '-o midi_out_ports', default is 0. Don't use '-a address' and '-p port', these are here to specify others multicast address and port, but it's not implemented on the master yet.
As in a standard backend in Jackmp, you can use '-S' (synchronous mode).
The asynchronous mode (without '-S') allows to send the computed data during the next cycle. You loose a one cycle extra latency, but you improve the masters while allowing it to receive data just after having sent some. In synchronous mode, data are sent back at the end of the cycle, that means after the process.
You can specify some options, like '-n name' (will give a name to the slave, default is the network hostname), '-C input_ports' (the number of master-->slave channels), '-P output_ports' (the number of slave-->master channels), default is 2 ; or '-i midi_in_ports' and '-o midi_out_ports', default is 0.
If you set multicast address or port on the master, you can add '-a xxx.xxx.xxx.xxx' and '-p udp_port'.
-------------------------------


+ 9
- 5
common/JackNetDriver.cpp View File

@@ -536,6 +536,10 @@ namespace Jack
for ( audio_port_index = 0; audio_port_index < fCaptureChannels; audio_port_index++ )
fNetAudioCaptureBuffer->SetBuffer ( audio_port_index, GetInputBuffer ( audio_port_index ) );

#ifdef JACK_MONITOR
fMeasureId = 0;
#endif

//receive sync (launch the cycle)
do
{
@@ -556,7 +560,7 @@ namespace Jack
do
{
rx_bytes = Recv ( fParams.fMtu, MSG_PEEK );
//error here, problem with send, just skip the cycle (return -1)
//error here, problem with recv, just skip the cycle (return -1)
if ( rx_bytes == SOCKET_ERROR )
return rx_bytes;
if ( rx_bytes && ( rx_head->fDataStream == 's' ) && ( rx_head->fID == fParams.fID ) )
@@ -591,7 +595,7 @@ namespace Jack
fRxHeader.fCycle = rx_head->fCycle;

#ifdef JACK_MONITOR
fMeasure[0] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
fMeasure[fMeasureId++] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
#endif
return 0;
}
@@ -616,7 +620,7 @@ namespace Jack
fNetAudioPlaybackBuffer->SetBuffer ( audio_port_index, GetOutputBuffer ( audio_port_index ) );

#ifdef JACK_MONITOR
fMeasure[1] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
fMeasure[fMeasureId++] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
#endif

//sync
@@ -630,7 +634,7 @@ namespace Jack
return tx_bytes;

#ifdef JACK_MONITOR
fMeasure[2] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
fMeasure[fMeasureId++] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
#endif

//midi
@@ -670,7 +674,7 @@ namespace Jack
}

#ifdef JACK_MONITOR
fMeasure[3] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
fMeasure[fMeasureId++] = ( ( float ) ( GetMicroSeconds() - JackDriver::fBeginDateUst ) / ( float ) fEngineControl->fPeriodUsecs ) * 100.f;
fMonitor->Write ( fMeasure );
#endif



+ 2
- 2
windows/Readme.txt View File

@@ -11,7 +11,7 @@ The built binaries will be located in '/Release/bin' (or '/Debug/bin' if you bui
- the two 'libjackmp.dll' and 'libjackservermp.dll', client and server jack libraries
- the 'jackdmp.exe', main application : the jack server
- the 'jack_xxx.exe' utilities and examples
- in the jackmp directory, you'll find the driver's DLL's ('jack_portaudio.dll' and 'jack_netdriver.dll') and some tools ( 'netmanager.dll' for example )
- in the jackmp directory, you'll find the driver's DLL's ('jack_portaudio.dll' and 'jack_netdriver.dll') and some tools ( 'netmanager.dll', 'audioadapter.dll', 'netadapter.dll' for example )
In Code::Blocks all the projects are automatically built in a correct order (dll's then apps) by doing 'build->build workspace'.
In VC6, you'll have to build the projects one by one.
@@ -41,7 +41,7 @@ You can use two drivers : PortAudio and NetDriver.
The PortAudio backend allow the use of many soundcards, using ASIO or WMME drivers (any ASIO driver can be seen by PortAudio).
The NetDriver allow you to use NetJack2 on windows. Thus you can easily exchange midi and audio streams bitween computers (Linux, MacOSX or Windows).
In both cases, you have to use the minimalist :
'jackdmp -R -S -d ...'
'jackdmp -R -d ...'
command. With PortAudio, you can have a list of supported drivers with :
'jackdmp -R -S -d portaudio -l'


+ 1
- 0
windows/Setup/jack.ci View File

@@ -73,6 +73,7 @@
<_><src>..\Release\bin\jackmp\jack_portaudio.dll</><dest>inst</><custom>jackmp</><ifexist>overnewer</><recurs>0</></>
<_><src>..\Release\bin\jackmp\netmanager.dll</><dest>inst</><custom>jackmp</><ifexist>overnewer</><recurs>0</></>
<_><src>..\Release\bin\jackmp\audioadapter.dll</><dest>inst</><custom>jackmp</><ifexist>overnewer</><recurs>0</></>
<_><src>..\Release\bin\jackmp\netadapter.dll</><dest>inst</><custom>jackmp</><ifexist>overnewer</><recurs>0</></>
<_><src>..\..\common\jack\control.h</><dest>inst</><custom>includes\jack</><ifexist>overnewer</><recurs>0</></>
<_><src>..\..\common\jack\intclient.h</><dest>inst</><custom>includes\jack</><ifexist>overnewer</><recurs>0</></>
<_><src>..\..\common\jack\jack.h</><dest>inst</><custom>includes\jack</><ifexist>overnewer</><recurs>0</></>


+ 56
- 0
windows/jack_netadapter.cbp View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="jack_netadapter" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Win32 Debug">
<Option output="Debug\bin\jack_netadapter" prefix_auto="1" extension_auto="1" />
<Option object_output="Debug\" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-DBUILD_DLL" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="user32" />
</Linker>
</Target>
<Target title="Win32 Release">
<Option output="Release\bin\jack_netadapter" prefix_auto="1" extension_auto="1" />
<Option object_output="Release\" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-DBUILD_DLL" />
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="user32" />
</Linker>
</Target>
</Build>
<Unit filename="main.cpp" />
<Unit filename="main.h" />
<Extensions>
<AutoVersioning>
<Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10" build_times_to_increment_minor="100" />
<Settings autoincrement="1" date_declarations="1" do_auto_increment="0" ask_to_increment="0" language="C++" svn="0" svn_directory="" header_path="version.h" />
<Changes_Log show_changes_editor="0" app_title="released version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" />
</AutoVersioning>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

Loading…
Cancel
Save