| 335 | |
| 336 | |
| 337 | void rtaudioInit() { |
| 338 | // Get RtAudio's driver list |
| 339 | std::vector<RtAudio::Api> apis; |
| 340 | RtAudio::getCompiledApi(apis); |
| 341 | |
| 342 | for (const ApiInfo& apiInfo : API_INFOS) { |
| 343 | auto it = std::find(apis.begin(), apis.end(), apiInfo.rtApi); |
| 344 | if (it == apis.end()) |
| 345 | continue; |
| 346 | // Create and add driver |
| 347 | RtAudioDriver* driver = new RtAudioDriver(apiInfo.rtApi, apiInfo.name); |
| 348 | audio::addDriver(apiInfo.driverId, driver); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | } // namespace rack |