+/** @brief Choose the default audio API by context
+ * @param apis Table of APIs or a null pointer
+ * @param context @ref UAUDIO_API_SERVER or @ref UAUDIO_API_CLIENT
+ * @return Default API or a null pointer
+ */
+const struct uaudio *uaudio_default(const struct uaudio *const *apis,
+ unsigned context) {
+ if(apis) {
+ for(int n = 0; apis[n]; ++n)
+ if(apis[n]->flags & context)
+ return apis[n];
+ }
+ return 0;
+}
+