| 211 | // ── Module loading via pactl ───────────────────────────────────────────────── |
| 212 | |
| 213 | static uint32_t runPactl(const QStringList& args) |
| 214 | { |
| 215 | QProcess proc; |
| 216 | proc.start("pactl", args); |
| 217 | if (!proc.waitForFinished(5000)) { |
| 218 | qCWarning(lcDax) << "PipeWireAudioBridge: pactl timed out:" << args; |
| 219 | return 0; |
| 220 | } |
| 221 | if (proc.exitCode() != 0) { |
| 222 | qCWarning(lcDax) << "PipeWireAudioBridge: pactl failed:" << proc.readAllStandardError().trimmed(); |
| 223 | return 0; |
| 224 | } |
| 225 | // pactl load-module returns the module index |
| 226 | bool ok = false; |
| 227 | uint32_t idx = proc.readAllStandardOutput().trimmed().toUInt(&ok); |
| 228 | return ok ? idx : 0; |
| 229 | } |
| 230 | |
| 231 | bool PipeWireAudioBridge::loadPipeSource(int index) |
| 232 | { |
no test coverage detected