diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-09-15 23:42:56 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-09-15 23:42:56 +0000 |
commit | e1f008f2a395422b0f1e0c931ea1550df853e6e4 (patch) | |
tree | 6b130f01398ec72d2166c9bd484cf53cc2632ee7 /polyp/source.c | |
parent | 0c9873e5b3212adc273400ff133e040080ee4b65 (diff) |
commit liboil porting changes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/liboil-test@344 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/source.c')
-rw-r--r-- | polyp/source.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/polyp/source.c b/polyp/source.c index fc73272c..a80c6af7 100644 --- a/polyp/source.c +++ b/polyp/source.c @@ -35,11 +35,22 @@ #include "subscribe.h" #include "log.h" -struct pa_source* pa_source_new(struct pa_core *core, pa_typeid_t typeid, const char *name, int fail, const struct pa_sample_spec *spec) { +struct pa_source* pa_source_new( + struct pa_core *core, + const char *name, + const char *driver, + int fail, + const struct pa_sample_spec *spec, + const struct pa_channel_map *map) { + struct pa_source *s; char st[256]; int r; - assert(core && spec && name && *name); + + assert(core); + assert(name); + assert(*name); + assert(spec); s = pa_xmalloc(sizeof(struct pa_source)); @@ -53,11 +64,16 @@ struct pa_source* pa_source_new(struct pa_core *core, pa_typeid_t typeid, const s->name = pa_xstrdup(name); s->description = NULL; - s->typeid = typeid; + s->driver = pa_xstrdup(driver); s->owner = NULL; s->core = core; s->sample_spec = *spec; + if (map) + s->channel_map = *map; + else + pa_channel_map_init_auto(&s->channel_map, spec->channels); + s->outputs = pa_idxset_new(NULL, NULL); s->monitor_of = NULL; @@ -108,6 +124,7 @@ static void source_free(struct pa_source *s) { pa_xfree(s->name); pa_xfree(s->description); + pa_xfree(s->driver); pa_xfree(s); } |