From: Laurent Aimar Date: Sun, 13 Dec 2009 12:22:05 +0000 (+0100) Subject: Give only once the same PCM buffer to projectM. X-Git-Tag: 1.1.0-ff~1983 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=cd5b4fb21722431f656953e1938061561c260275;p=vlc Give only once the same PCM buffer to projectM. --- diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp index 42475fd39a..2e173b3c3c 100644 --- a/modules/visualization/projectm.cpp +++ b/modules/visualization/projectm.cpp @@ -335,9 +335,11 @@ static void *Thread( void *p_data ) /* Render the image and swap the buffers */ vlc_mutex_lock( &p_sys->lock ); if( p_sys->i_nb_samples > 0 ) + { p_sys->p_projectm->pcm()->addPCMfloat( p_sys->p_buffer, p_sys->i_nb_samples ); - + p_sys->i_nb_samples = 0; + } p_sys->p_projectm->renderFrame(); vlc_mutex_unlock( &p_sys->lock );