properly setup port system latency for Dummy & ALSA backend

This commit is contained in:
Robin Gareus 2014-06-06 00:57:30 +02:00
parent 792fe016e7
commit 1c87f6adec
2 changed files with 4 additions and 4 deletions

View File

@ -844,7 +844,7 @@ AlsaAudioBackend::register_system_audio_ports()
snprintf(tmp, sizeof(tmp), "system:playback_%d", i); snprintf(tmp, sizeof(tmp), "system:playback_%d", i);
PortHandle p = add_port(std::string(tmp), DataType::AUDIO, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal)); PortHandle p = add_port(std::string(tmp), DataType::AUDIO, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
if (!p) return -1; if (!p) return -1;
set_latency_range (p, false, lr); set_latency_range (p, true, lr);
_system_outputs.push_back(static_cast<AlsaPort*>(p)); _system_outputs.push_back(static_cast<AlsaPort*>(p));
} }
return 0; return 0;
@ -936,7 +936,7 @@ AlsaAudioBackend::register_system_midi_ports()
snprintf(tmp, sizeof(tmp), "system:midi_playback_%d", i); snprintf(tmp, sizeof(tmp), "system:midi_playback_%d", i);
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal)); PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
if (!p) return -1; if (!p) return -1;
set_latency_range (p, false, lr); set_latency_range (p, true, lr);
_system_midi_out.push_back(static_cast<AlsaPort*>(p)); _system_midi_out.push_back(static_cast<AlsaPort*>(p));
} }

View File

@ -648,7 +648,7 @@ DummyAudioBackend::register_system_ports()
snprintf(tmp, sizeof(tmp), "system:playback_%d", i); snprintf(tmp, sizeof(tmp), "system:playback_%d", i);
PortHandle p = add_port(std::string(tmp), DataType::AUDIO, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal)); PortHandle p = add_port(std::string(tmp), DataType::AUDIO, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
if (!p) return -1; if (!p) return -1;
set_latency_range (p, false, lr); set_latency_range (p, true, lr);
} }
/* midi ports */ /* midi ports */
@ -667,7 +667,7 @@ DummyAudioBackend::register_system_ports()
snprintf(tmp, sizeof(tmp), "system:midi_playback_%d", i); snprintf(tmp, sizeof(tmp), "system:midi_playback_%d", i);
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal)); PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
if (!p) return -1; if (!p) return -1;
set_latency_range (p, false, lr); set_latency_range (p, true, lr);
} }
return 0; return 0;