]> git.sesse.net Git - vlc/commitdiff
jack: lock ringbuffer in memory
authorTristan Matthews <le.businessman@gmail.com>
Fri, 3 May 2013 05:02:13 +0000 (01:02 -0400)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 3 May 2013 12:50:11 +0000 (14:50 +0200)
The ringbuffer will be locked and later unlocked (during jack_ringbuffer_free),
on systems which implement mlock().

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/audio_output/jack.c

index 9d8b50f088ff2f9dc184aff83c507f54b6c14c02..9fbebb97e0cd906e2650007e6d3c5069a1c42971 100644 (file)
@@ -175,6 +175,11 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
         goto error_out;
     }
 
+    if( jack_ringbuffer_mlock( p_sys->p_jack_ringbuffer ))
+    {
+        msg_Warn( p_aout, "failed to lock JACK ringbuffer in memory" );
+    }
+
     /* Create the output ports */
     for( i = 0; i < p_sys->i_channels; i++ )
     {