chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'api' configuration command now uses uaudio. The list of APIs is only
[disorder]
/
lib
/
uaudio.c
diff --git
a/lib/uaudio.c
b/lib/uaudio.c
index 3625901eeccc44e1ef29c3c199ba133c9ae96b6a..2f6b67cc67e1c9095d6c43c553df78a297d575f4 100644
(file)
--- a/
lib/uaudio.c
+++ b/
lib/uaudio.c
@@
-56,11
+56,11
@@
void uaudio_set(const char *name, const char *value) {
hash_add(uaudio_options, name, &value, HASH_INSERT_OR_REPLACE);
}
hash_add(uaudio_options, name, &value, HASH_INSERT_OR_REPLACE);
}
-/** @brief
S
et a uaudio option */
-char *uaudio_get(const char *name) {
+/** @brief
G
et a uaudio option */
+char *uaudio_get(const char *name
, const char *default_value
) {
const char *value = (uaudio_options ?
*(char **)hash_find(uaudio_options, name)
const char *value = (uaudio_options ?
*(char **)hash_find(uaudio_options, name)
- :
NULL
);
+ :
default_value
);
return value ? xstrdup(value) : NULL;
}
return value ? xstrdup(value) : NULL;
}