[vlc-devel] [PATCH] jack: lock ringbuffer in memory

Tristan Matthews le.businessman at gmail.com
Fri May 3 06:55:35 CEST 2013


The ringbuffer will be locked and later unlocked (during jack_ringbuffer_free),
on systems which implement mlock().
---
 modules/audio_output/jack.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/audio_output/jack.c b/modules/audio_output/jack.c
index 9d8b50f..163127e 100644
--- a/modules/audio_output/jack.c
+++ b/modules/audio_output/jack.c
@@ -175,6 +175,12 @@ 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++ )
     {
-- 
1.8.1.2




More information about the vlc-devel mailing list