chiark / gitweb /
'api' configuration command now uses uaudio. The list of APIs is only
[disorder] / lib / uaudio.c
index 266846e07f225c5751c3bbbfc84b4610470cb83c..2f6b67cc67e1c9095d6c43c553df78a297d575f4 100644 (file)
@@ -56,11 +56,11 @@ void uaudio_set(const char *name, const char *value) {
   hash_add(uaudio_options, name, &value, HASH_INSERT_OR_REPLACE);
 }
 
-/** @brief Set a uaudio option */
-char *uaudio_get(const char *name) {
+/** @brief Get a uaudio option */
+char *uaudio_get(const char *name, const char *default_value) {
   const char *value = (uaudio_options ?
                        *(char **)hash_find(uaudio_options, name)
-                       : NULL);
+                       : default_value);
   return value ? xstrdup(value) : NULL;
 }
 
@@ -89,28 +89,6 @@ void uaudio_set_format(int rate, int channels, int bits, int signed_) {
   uaudio_sample_size = bits / CHAR_BIT;
 }
 
-/** @brief List of known APIs
- *
- * Terminated by a null pointer.
- *
- * The first one will be used as a default, so putting ALSA before OSS
- * constitutes a policy decision.
- */
-const struct uaudio *uaudio_apis[] = {
-#if HAVE_COREAUDIO_AUDIOHARDWARE_H
-  &uaudio_coreaudio,
-#endif  
-#if HAVE_ALSA_ASOUNDLIB_H
-  &uaudio_alsa,
-#endif
-#if HAVE_SYS_SOUNDCARD_H || EMPEG_HOST
-  &uaudio_oss,
-#endif
-  &uaudio_rtp,
-  &uaudio_command,
-  NULL,
-};
-
 /*
 Local Variables:
 c-basic-offset:2