]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Fix port names in jack plugin
authorTakashi Iwai <tiwai@suse.de>
Tue, 2 May 2006 11:50:39 +0000 (13:50 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 2 May 2006 11:50:39 +0000 (13:50 +0200)
There is a flaw in alsa-jack, the channel name (out_001, etc) is
ended with a newline.
This causes problems when using jack_connect and jack_disconnect.

From: Maarten Maathuis <madman2003@gmail.com>

jack/pcm_jack.c

index 43503029f2bd4debe3d87c67b590da354df8409e..c1e7a3afa2d6dfbbde0050ec0efd347522af5638 100644 (file)
@@ -164,12 +164,12 @@ static int snd_pcm_jack_prepare(snd_pcm_ioplug_t *io)
                char port_name[32];
                if (io->stream == SND_PCM_STREAM_PLAYBACK) {
 
-                       sprintf(port_name, "out_%03d\n", i);
+                       sprintf(port_name, "out_%03d", i);
                        jack->ports[i] = jack_port_register(jack->client, port_name,
                                                            JACK_DEFAULT_AUDIO_TYPE,
                                                            JackPortIsOutput, 0);
                } else {
-                       sprintf(port_name, "in_%03d\n", i);
+                       sprintf(port_name, "in_%03d", i);
                        jack->ports[i] = jack_port_register(jack->client, port_name,
                                                            JACK_DEFAULT_AUDIO_TYPE,
                                                            JackPortIsInput, 0);