| 294 | } |
| 295 | |
| 296 | int Port::getNumInputs() { |
| 297 | if (!device) |
| 298 | return 0; |
| 299 | try { |
| 300 | return math::clamp(device->getNumInputs() - inputOffset, 0, maxInputs); |
| 301 | } |
| 302 | catch (Exception& e) { |
| 303 | WARN("Audio port could not get device number of inputs: %s", e.what()); |
| 304 | return 0; |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | int Port::getNumOutputs() { |
| 309 | if (!device) |