Browse Source

[firewire] Use UpdateLatencies() in Attach().

Cleanup of obsolete code, the functionality is now provided
by UpdateLatencies().
tags/1.9.9.5
Adrian Knoth 12 years ago
parent
commit
8603dd8127
1 changed files with 2 additions and 11 deletions
  1. +2
    -11
      linux/firewire/JackFFADODriver.cpp

+ 2
- 11
linux/firewire/JackFFADODriver.cpp View File

@@ -427,7 +427,6 @@ int JackFFADODriver::Attach()
jack_port_id_t port_index;
char buf[REAL_JACK_PORT_NAME_SIZE];
char portname[REAL_JACK_PORT_NAME_SIZE];
jack_latency_range_t range;

ffado_driver_t* driver = (ffado_driver_t*)fDriver;

@@ -513,8 +512,6 @@ int JackFFADODriver::Attach()
ffado_streaming_capture_stream_onoff(driver->dev, chn, 0);

port = fGraphManager->GetPort(port_index);
range.min = range.max = driver->period_size + driver->capture_frame_latency;
port->SetLatencyRange(JackCaptureLatency, &range);
// capture port aliases (jackd1 style port names)
snprintf(buf, sizeof(buf), "%s:capture_%i", fClientControl.fName, (int) chn + 1);
port->SetAlias(buf);
@@ -544,9 +541,6 @@ int JackFFADODriver::Attach()
// setup the midi buffer
driver->capture_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t));

port = fGraphManager->GetPort(port_index);
range.min = range.max = driver->period_size + driver->capture_frame_latency;
port->SetLatencyRange(JackCaptureLatency, &range);
fCapturePortList[chn] = port_index;
jack_log("JackFFADODriver::Attach fCapturePortList[i] %ld ", port_index);
fCaptureChannels++;
@@ -590,8 +584,6 @@ int JackFFADODriver::Attach()

port = fGraphManager->GetPort(port_index);
// Add one buffer more latency if "async" mode is used...
range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency;
port->SetLatencyRange(JackPlaybackLatency, &range);
// playback port aliases (jackd1 style port names)
snprintf(buf, sizeof(buf), "%s:playback_%i", fClientControl.fName, (int) chn + 1);
port->SetAlias(buf);
@@ -626,9 +618,6 @@ int JackFFADODriver::Attach()

driver->playback_channels[chn].midi_buffer = (uint32_t *)calloc(driver->period_size, sizeof(uint32_t));

port = fGraphManager->GetPort(port_index);
range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1)) + ((fEngineControl->fSyncMode) ? 0 : fEngineControl->fBufferSize) + driver->playback_frame_latency;
port->SetLatencyRange(JackPlaybackLatency, &range);
fPlaybackPortList[chn] = port_index;
jack_log("JackFFADODriver::Attach fPlaybackPortList[i] %ld ", port_index);
fPlaybackChannels++;
@@ -637,6 +626,8 @@ int JackFFADODriver::Attach()
}
}

UpdateLatencies();

assert(fCaptureChannels < DRIVER_PORT_NUM);
assert(fPlaybackChannels < DRIVER_PORT_NUM);



Loading…
Cancel
Save