| 377 | } |
| 378 | |
| 379 | void DaxIqWorker::destroyPipe(int channel) |
| 380 | { |
| 381 | #ifndef Q_OS_WIN |
| 382 | int idx = channel - 1; |
| 383 | if (idx < 0 || idx >= DaxIqModel::NUM_CHANNELS) return; |
| 384 | if (m_pipeFds[idx] >= 0) { |
| 385 | ::close(m_pipeFds[idx]); |
| 386 | m_pipeFds[idx] = -1; |
| 387 | } |
| 388 | // Unload the pipe-source module by its stored index (clean, no grep race), |
| 389 | // then remove the FIFO we created. |
| 390 | if (m_pipeModuleIdx[idx] != 0) { |
| 391 | runPactlSync({"unload-module", QString::number(m_pipeModuleIdx[idx])}); |
| 392 | m_pipeModuleIdx[idx] = 0; |
| 393 | } |
| 394 | const QString pipePath = iqPipePath(channel); |
| 395 | if (!pipePath.isEmpty()) |
| 396 | ::unlink(pipePath.toLocal8Bit().constData()); |
| 397 | #else |
| 398 | Q_UNUSED(channel); |
| 399 | #endif |
| 400 | } |
| 401 | |
| 402 | void DaxIqWorker::processIqPacket(int channel, const QByteArray& rawPayload, int sampleRate) |
| 403 | { |
no test coverage detected