| 202 | } |
| 203 | |
| 204 | void closeStream() { |
| 205 | if (rtAudio->isStreamRunning()) { |
| 206 | INFO("Stopping RtAudio %s device %d", driver->getName().c_str(), deviceId); |
| 207 | rtAudio->stopStream(); |
| 208 | } |
| 209 | if (rtAudio->isStreamOpen()) { |
| 210 | INFO("Closing RtAudio %s device %d", driver->getName().c_str(), deviceId); |
| 211 | rtAudio->closeStream(); |
| 212 | } |
| 213 | |
| 214 | onStopStream(); |
| 215 | } |
| 216 | |
| 217 | std::string getName() override { |
| 218 | return deviceInfo.name; |