| 175 | } |
| 176 | |
| 177 | void PipeWireNativeRxSource::close() |
| 178 | { |
| 179 | if (m_stream) { |
| 180 | auto& ctx = PipeWireNativeContext::instance(); |
| 181 | ctx.lock(); |
| 182 | pw_stream_disconnect(m_stream); |
| 183 | pw_stream_destroy(m_stream); |
| 184 | m_stream = nullptr; |
| 185 | ctx.unlock(); |
| 186 | } |
| 187 | if (m_contextAcquired) { |
| 188 | PipeWireNativeContext::instance().release(); |
| 189 | m_contextAcquired = false; |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | void PipeWireNativeRxSource::feedAudio(const float* samples, uint32_t count) |
| 194 | { |