mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
fix port-unregister (on failed latency measurement)
This commit is contained in:
parent
a0392a2349
commit
157161e482
1 changed files with 4 additions and 0 deletions
|
|
@ -1110,11 +1110,13 @@ AudioEngine::start_latency_detection (bool for_midi)
|
|||
|
||||
const string portname ("latency_in");
|
||||
if ((_latency_input_port = pe.register_port (portname, DataType::MIDI, IsInput)) == 0) {
|
||||
pe.unregister_port (_latency_input_port);
|
||||
pe.unregister_port (_latency_output_port);
|
||||
stop (true);
|
||||
return -1;
|
||||
}
|
||||
if (pe.connect (_latency_input_name, make_port_name_non_relative (portname))) {
|
||||
pe.unregister_port (_latency_input_port);
|
||||
pe.unregister_port (_latency_output_port);
|
||||
stop (true);
|
||||
return -1;
|
||||
|
|
@ -1136,11 +1138,13 @@ AudioEngine::start_latency_detection (bool for_midi)
|
|||
|
||||
const string portname ("latency_in");
|
||||
if ((_latency_input_port = pe.register_port (portname, DataType::AUDIO, IsInput)) == 0) {
|
||||
pe.unregister_port (_latency_input_port);
|
||||
pe.unregister_port (_latency_output_port);
|
||||
stop (true);
|
||||
return -1;
|
||||
}
|
||||
if (pe.connect (_latency_input_name, make_port_name_non_relative (portname))) {
|
||||
pe.unregister_port (_latency_input_port);
|
||||
pe.unregister_port (_latency_output_port);
|
||||
stop (true);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue