don't set the sink/source descriptions manually, use the new functions pa_{sink,source}_set_description() instead

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1205 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-08-11 23:58:55 +00:00
parent af1b0317f6
commit bfa6604b1d
15 changed files with 69 additions and 41 deletions

View file

@ -349,7 +349,7 @@ int pa__init(pa_core *c, pa_module*m) {
int enable_bits = 0, zero = 0;
int playback = 1, record = 1;
pa_modargs *ma = NULL;
char hwdesc[64];
char hwdesc[64], *t;
pa_channel_map map;
assert(c);
@ -439,11 +439,12 @@ int pa__init(pa_core *c, pa_module*m) {
u->source->get_hw_volume = source_get_hw_volume;
u->source->set_hw_volume = source_set_hw_volume;
pa_source_set_owner(u->source, m);
u->source->description = pa_sprintf_malloc("OSS PCM/mmap() on %s%s%s%s",
p,
hwdesc[0] ? " (" : "",
hwdesc[0] ? hwdesc : "",
hwdesc[0] ? ")" : "");
pa_source_set_description(u->source, t = pa_sprintf_malloc("OSS PCM/mmap() on %s%s%s%s",
p,
hwdesc[0] ? " (" : "",
hwdesc[0] ? hwdesc : "",
hwdesc[0] ? ")" : ""));
pa_xfree(t);
u->source->is_hardware = 1;
u->in_memblocks = pa_xnew0(pa_memblock*, u->in_fragments);
@ -480,11 +481,12 @@ int pa__init(pa_core *c, pa_module*m) {
u->sink->set_hw_volume = sink_set_hw_volume;
u->sink->userdata = u;
pa_sink_set_owner(u->sink, m);
u->sink->description = pa_sprintf_malloc("OSS PCM/mmap() on %s%s%s%s",
p,
hwdesc[0] ? " (" : "",
hwdesc[0] ? hwdesc : "",
hwdesc[0] ? ")" : "");
pa_sink_set_description(u->sink, t = pa_sprintf_malloc("OSS PCM/mmap() on %s%s%s%s",
p,
hwdesc[0] ? " (" : "",
hwdesc[0] ? hwdesc : "",
hwdesc[0] ? ")" : ""));
pa_xfree(t);
u->sink->is_hardware = 1;
u->out_memblocks = pa_xmalloc0(sizeof(struct memblock *)*u->out_fragments);