Browse Source

libjacknet: -1 now used to get master physical inputs/outputs.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4381 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
1245be0e82
2 changed files with 19 additions and 7 deletions
  1. +8
    -0
      common/JackNetAPI.cpp
  2. +11
    -7
      common/jack/net.h

+ 8
- 0
common/JackNetAPI.cpp View File

@@ -65,6 +65,10 @@ extern "C"

typedef struct {

int audio_input;
int audio_output;
int midi_input;
int midi_output;
jack_nframes_t buffer_size;
jack_nframes_t sample_rate;
char master_name[MASTER_NAME_SIZE];
@@ -505,6 +509,10 @@ struct JackNetExtSlave : public JackNetSlaveInterface, public JackRunnableInterf
if (result != NULL) {
result->buffer_size = fParams.fPeriodSize;
result->sample_rate = fParams.fSampleRate;
result->audio_input = fParams.fSendAudioChannels;
result->audio_output = fParams.fReturnAudioChannels;
result->midi_input = fParams.fSendMidiChannels;
result->midi_output = fParams.fReturnMidiChannels;
strcpy(result->master_name, fParams.fMasterNetName);
}



+ 11
- 7
common/jack/net.h View File

@@ -51,10 +51,10 @@ enum JackNetEncoder {

typedef struct {

int audio_input; // from master or to slave
int audio_output; // to master or from slave
int midi_input; // from master or to slave
int midi_output; // to master or from slave
int audio_input; // from master or to slave (-1 for get master audio physical outputs)
int audio_output; // to master or from slave (-1 for get master audio physical inputs)
int midi_input; // from master or to slave (-1 for get master MIDI physical outputs)
int midi_output; // to master or from slave (-1 for get master MIDI physical inputs)
int mtu; // network Maximum Transmission Unit
int time_out; // in second, -1 means in infinite
int encoder; // Encoder type (one of JackNetEncoder)
@@ -65,9 +65,13 @@ typedef struct {

typedef struct {

jack_nframes_t buffer_size;
jack_nframes_t sample_rate;
char master_name[MASTER_NAME_SIZE];
int audio_input; // master audio physical outputs
int audio_output; // master audio physical inputs
int midi_input; // master MIDI physical outputs
int midi_output; // master MIDI physical inputs
jack_nframes_t buffer_size; // mater buffer size
jack_nframes_t sample_rate; // mater sample rate
char master_name[MASTER_NAME_SIZE]; // master machine name

} jack_master_t;



Loading…
Cancel
Save