]> code.delx.au - pulseaudio/blobdiff - src/polypcore/protocol-simple.c
when loading sound files, initialize channel map data properly
[pulseaudio] / src / polypcore / protocol-simple.c
index fac542391f7c6fb229b6ac7f758e5def789b53d0..c2f5344433cbcf67a4c24a6341122d4c6433a6c3 100644 (file)
@@ -132,7 +132,7 @@ static int do_read(struct connection *c) {
     }
     
     if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) {
-        pa_log_debug(__FILE__": read() failed: %s\n", r == 0 ? "EOF" : strerror(errno));
+        pa_log_debug(__FILE__": read() failed: %s", r == 0 ? "EOF" : strerror(errno));
         return -1;
     }
 
@@ -166,7 +166,7 @@ static int do_write(struct connection *c) {
     
     if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) {
         pa_memblock_unref(chunk.memblock);
-        pa_log(__FILE__": write(): %s\n", strerror(errno));
+        pa_log(__FILE__": write(): %s", strerror(errno));
         return -1;
     }
     
@@ -313,7 +313,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
     assert(s && io && p);
 
     if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
-        pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.\n", MAX_CONNECTIONS);
+        pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
         pa_iochannel_free(io);
         return;
     }
@@ -342,12 +342,12 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
         size_t l;
 
         if (!(sink = pa_namereg_get(p->core, p->sink_name, PA_NAMEREG_SINK, 1))) {
-            pa_log(__FILE__": Failed to get sink.\n");
+            pa_log(__FILE__": Failed to get sink.");
             goto fail;
         }
 
         if (!(c->sink_input = pa_sink_input_new(sink, __FILE__, c->client->name, &p->sample_spec, NULL, 0, -1))) {
-            pa_log(__FILE__": Failed to create sink input.\n");
+            pa_log(__FILE__": Failed to create sink input.");
             goto fail;
         }
         
@@ -380,13 +380,13 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
         size_t l;
 
         if (!(source = pa_namereg_get(p->core, p->source_name, PA_NAMEREG_SOURCE, 1))) {
-            pa_log(__FILE__": Failed to get source.\n");
+            pa_log(__FILE__": Failed to get source.");
             goto fail;
         }
 
         c->source_output = pa_source_output_new(source, __FILE__, c->client->name, &p->sample_spec, NULL, -1);
         if (!c->source_output) {
-            pa_log(__FILE__": Failed to create source output.\n");
+            pa_log(__FILE__": Failed to create source output.");
             goto fail;
         }
         c->source_output->owner = p->module;
@@ -437,7 +437,7 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv
 
     p->sample_spec = core->default_sample_spec;
     if (pa_modargs_get_sample_spec(ma, &p->sample_spec) < 0) {
-        pa_log(__FILE__": Failed to parse sample type specification.\n");
+        pa_log(__FILE__": Failed to parse sample type specification.");
         goto fail;
     }
 
@@ -446,20 +446,20 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv
     
     enable = 0;
     if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) {
-        pa_log(__FILE__": record= expects a numeric argument.\n");
+        pa_log(__FILE__": record= expects a numeric argument.");
         goto fail;
     }
     p->mode = enable ? RECORD : 0;
 
     enable = 1;
     if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) {
-        pa_log(__FILE__": playback= expects a numeric argument.\n");
+        pa_log(__FILE__": playback= expects a numeric argument.");
         goto fail;
     }
     p->mode |= enable ? PLAYBACK : 0;
 
     if ((p->mode & (RECORD|PLAYBACK)) == 0) {
-        pa_log(__FILE__": neither playback nor recording enabled for protocol.\n");
+        pa_log(__FILE__": neither playback nor recording enabled for protocol.");
         goto fail;
     }