mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
* add first part of zeroconf publisher
* bump version to 0.7.1. * improve logging subsystem (introducing log levels) * remove verbose flag on cli * add new API pa_sample_format_to_string() * replace strtol() by usages of pa_atou() and pa_atoi() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@317 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
5be9641ffe
commit
73eabece33
38 changed files with 467 additions and 280 deletions
|
|
@ -190,41 +190,27 @@ const char *pa_modargs_get_value(struct pa_modargs *ma, const char *key, const c
|
|||
|
||||
int pa_modargs_get_value_u32(struct pa_modargs *ma, const char *key, uint32_t *value) {
|
||||
const char *v;
|
||||
char *e;
|
||||
unsigned long l;
|
||||
assert(ma && key && value);
|
||||
|
||||
if (!(v = pa_modargs_get_value(ma, key, NULL)))
|
||||
return 0;
|
||||
|
||||
if (!*v)
|
||||
return -1;
|
||||
|
||||
l = strtoul(v, &e, 0);
|
||||
if (*e)
|
||||
if (pa_atou(v, value) < 0)
|
||||
return -1;
|
||||
|
||||
*value = (uint32_t) l;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pa_modargs_get_value_s32(struct pa_modargs *ma, const char *key, int32_t *value) {
|
||||
const char *v;
|
||||
char *e;
|
||||
signed long l;
|
||||
assert(ma && key && value);
|
||||
|
||||
if (!(v = pa_modargs_get_value(ma, key, NULL)))
|
||||
return 0;
|
||||
|
||||
if (!*v)
|
||||
if (pa_atoi(v, value) < 0)
|
||||
return -1;
|
||||
|
||||
l = strtol(v, &e, 0);
|
||||
if (*e)
|
||||
return -1;
|
||||
|
||||
*value = (int32_t) l;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue