[PlanetCCRMA] Re: [linux-audio-user] audacity and jack

Brad Fuller brad@sonaural.com
Thu Jul 28 13:39:01 2005


This is a multi-part message in MIME format.
--------------000408040501030501030803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Fernando Lopez-Lezcano wrote:

>On Thu, 2005-07-28 at 02:06, Emmanuel Serié wrote:
>  
>
>>Le Mercredi 27 Juillet 2005 23:17, David Ford a écrit :
>>
>>    
>>
>>>See the Audacity wiki --
>>>http://audacityteam.org/wiki/index.pl?LinuxIssues -- it has details on
>>>how to make audacity work with alsa. (and maybe then jack as well)
>>>
>>>David
>>>      
>>>
>>Thanks!
>>I have compile it as they say, using the latest portaudio-v19 and it works 
>>apparentlty perfectly!
>>Just, a client PortAudio-5121 appear when I do "play" in audacity, but it 
>>desappear when I do "stop". So I can't do a connection between audacity and 
>>other output client of jack than alsa_pcm...
>>    
>>
>
>I think I read somewhere you can select the connection from inside
>audacity, but not for other jack clients that were not there when
>audacity started. 
>
>The very "unjack" behavior of being connected only while playing is one
>of the reasons I have not yet built a jack enabled audacity in Planet
>CCRMA. I don't know if the culprit is portaudio itself or the code
>inside audacity. Well, maybe I should build one anyway. 
>
>-- Fernando
>
>  
>
Is the patch that Chris Cannam sent to this list fix this problem?
If so, why doesn't Audacity use it?
It's attached.

>>So thanks a lot, I am very happy to be able to use audacity with jack!
>>Maybe could we make an rpm on PlanetCCRMA?
>>
>>Now I have an other question:
>>Is it ossible to compile any audio application in that maner if we want that 
>>it become compatible with jack?
>>For exemple, could I recompile amarok (mp3 player) in this manner?
>>
>>Best Regards,
>>Emmanuel.
>>    
>>

--------------000408040501030501030803
Content-Type: text/x-diff;
 name="pa_jack.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pa_jack.c.diff"

--- pa_jack.c.dist	2004-12-23 18:30:09.000000000 +0000
+++ pa_jack.c	2005-07-26 20:25:46.000000000 +0100
@@ -573,7 +573,6 @@
             jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );
             curDevInfo->defaultLowInputLatency = curDevInfo->defaultHighInputLatency =
                 jack_port_get_latency( p ) / globalSampleRate;
-            free( p );
 
             for( i = 0; clientPorts[i] != NULL; i++)
             {
@@ -595,7 +594,6 @@
             jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );
             curDevInfo->defaultLowOutputLatency = curDevInfo->defaultHighOutputLatency =
                 jack_port_get_latency( p ) / globalSampleRate;
-            free( p );
 
             for( i = 0; clientPorts[i] != NULL; i++)
             {
@@ -634,7 +632,7 @@
     if( pthread_self() == mainThread_ )
     {
         assert( msg );
-        free( jackErr_ );
+        if ( jackErr_ ) free( jackErr_ );
         jackErr_ = malloc( strlen( msg ) );
         sprintf( jackErr_, msg );
     }
@@ -961,13 +959,11 @@
     {
         if( stream->local_input_ports[i] )
             ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_input_ports[i] ), 0 );
-        free( stream->remote_output_ports[i] );
     }
     for( i = 0; i < stream->num_outgoing_connections; ++i )
     {
         if( stream->local_output_ports[i] )
             ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_output_ports[i] ), 0 );
-        free( stream->remote_input_ports[i] );
     }
 
     if( terminateStreamRepresentation )

--------------000408040501030501030803--