mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-19 08:57:00 -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
|
|
@ -88,8 +88,9 @@ static int load_rules(struct userdata *u, const char *filename) {
|
|||
}
|
||||
|
||||
while (!feof(f)) {
|
||||
char *d, *v, *e = NULL;
|
||||
char *d, *v;
|
||||
pa_volume_t volume;
|
||||
uint32_t k;
|
||||
regex_t regex;
|
||||
char ln[256];
|
||||
struct rule *rule;
|
||||
|
|
@ -114,14 +115,14 @@ static int load_rules(struct userdata *u, const char *filename) {
|
|||
}
|
||||
|
||||
*d = 0;
|
||||
|
||||
volume = (pa_volume_t) strtol(v, &e, 0);
|
||||
|
||||
if (!e || *e) {
|
||||
if (pa_atou(v, &k) < 0) {
|
||||
pa_log(__FILE__": [%s:%u] failed to parse volume\n", filename, n);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
volume = (pa_volume_t) k;
|
||||
|
||||
|
||||
if (regcomp(®ex, ln, REG_EXTENDED|REG_NOSUB) != 0) {
|
||||
pa_log(__FILE__": [%s:%u] invalid regular expression\n", filename, n);
|
||||
goto finish;
|
||||
|
|
@ -162,10 +163,8 @@ static void callback(struct pa_core *c, enum pa_subscription_event_type t, uint3
|
|||
if (t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW))
|
||||
return;
|
||||
|
||||
if (!(si = pa_idxset_get_by_index(c->sink_inputs, index))) {
|
||||
pa_log(__FILE__": WARNING: failed to get sink input\n");
|
||||
if (!(si = pa_idxset_get_by_index(c->sink_inputs, index)))
|
||||
return;
|
||||
}
|
||||
|
||||
if (!si->name)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue