Commit 3e84fdc9 authored by Stephane Letz's avatar Stephane Letz
Browse files

Correct JackNetExtMaster::FreePorts.

parent d2be14dd
......@@ -378,36 +378,36 @@ struct JackNetExtMaster : public JackNetMasterInterface {
void FreePorts()
{
if (fAudioPlaybackBuffer) {
if (fAudioCaptureBuffer) {
for (int audio_port_index = 0; audio_port_index < fParams.fSendAudioChannels; audio_port_index++) {
delete[] fAudioPlaybackBuffer[audio_port_index];
delete[] fAudioCaptureBuffer[audio_port_index];
}
delete[] fAudioPlaybackBuffer;
fAudioPlaybackBuffer = NULL;
delete[] fAudioCaptureBuffer;
fAudioCaptureBuffer = NULL;
}
if (fMidiPlaybackBuffer) {
if (fMidiCaptureBuffer) {
for (int midi_port_index = 0; midi_port_index < fParams.fSendMidiChannels; midi_port_index++) {
delete[] (fMidiPlaybackBuffer[midi_port_index]);
delete[] fMidiCaptureBuffer[midi_port_index];
}
delete[] fMidiPlaybackBuffer;
fMidiPlaybackBuffer = NULL;
delete[] fMidiCaptureBuffer;
fMidiCaptureBuffer = NULL;
}
if (fAudioCaptureBuffer) {
if (fAudioPlaybackBuffer) {
for (int audio_port_index = 0; audio_port_index < fParams.fReturnAudioChannels; audio_port_index++) {
delete[] fAudioCaptureBuffer[audio_port_index];
delete[] fAudioPlaybackBuffer[audio_port_index];
}
delete[] fAudioCaptureBuffer;
fAudioCaptureBuffer = NULL;
delete[] fAudioPlaybackBuffer;
fAudioPlaybackBuffer = NULL;
}
if (fMidiCaptureBuffer) {
if (fMidiPlaybackBuffer) {
for (int midi_port_index = 0; midi_port_index < fParams.fReturnMidiChannels; midi_port_index++) {
delete[] fMidiCaptureBuffer[midi_port_index];
delete[] (fMidiPlaybackBuffer[midi_port_index]);
}
delete[] fMidiCaptureBuffer;
fMidiCaptureBuffer = NULL;
delete[] fMidiPlaybackBuffer;
fMidiPlaybackBuffer = NULL;
}
}
......
......@@ -87,25 +87,25 @@ namespace Jack
PRE_PACKED_STRUCTURE
struct _session_params
{
char fPacketType[8]; //packet type ('param')
uint32_t fProtocolVersion; //version
int32_t fPacketID; //indicates the packet type
char fName[JACK_CLIENT_NAME_SIZE]; //slave's name
char fMasterNetName[256]; //master hostname (network)
char fSlaveNetName[256]; //slave hostname (network)
uint32_t fMtu; //connection mtu
uint32_t fID; //slave's ID
uint32_t fTransportSync; //is the transport synced ?
int32_t fSendAudioChannels; //number of master->slave channels
int32_t fReturnAudioChannels; //number of slave->master channels
int32_t fSendMidiChannels; //number of master->slave midi channels
int32_t fReturnMidiChannels; //number of slave->master midi channels
uint32_t fSampleRate; //session sample rate
uint32_t fPeriodSize; //period size
uint32_t fSampleEncoder; //samples encoder
uint32_t fKBps; //KB per second for CELT encoder
uint32_t fSlaveSyncMode; //is the slave in sync mode ?
uint32_t fNetworkLatency; //network latency
char fPacketType[8]; //packet type ('param')
uint32_t fProtocolVersion; //version
int32_t fPacketID; //indicates the packet type
char fName[JACK_CLIENT_NAME_SIZE]; //slave's name
char fMasterNetName[JACK_SERVER_NAME_SIZE]; //master hostname (network)
char fSlaveNetName[JACK_SERVER_NAME_SIZE]; //slave hostname (network)
uint32_t fMtu; //connection mtu
uint32_t fID; //slave's ID
uint32_t fTransportSync; //is the transport synced ?
int32_t fSendAudioChannels; //number of master->slave channels
int32_t fReturnAudioChannels; //number of slave->master channels
int32_t fSendMidiChannels; //number of master->slave midi channels
int32_t fReturnMidiChannels; //number of slave->master midi channels
uint32_t fSampleRate; //session sample rate
uint32_t fPeriodSize; //period size
uint32_t fSampleEncoder; //samples encoder
uint32_t fKBps; //KB per second for CELT encoder
uint32_t fSlaveSyncMode; //is the slave in sync mode ?
uint32_t fNetworkLatency; //network latency
} POST_PACKED_STRUCTURE;
//net status **********************************************************************************
......
Supports Markdown
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