Commit cd5b4fb2 authored by Laurent Aimar's avatar Laurent Aimar

Give only once the same PCM buffer to projectM.

parent 745c790b
...@@ -335,9 +335,11 @@ static void *Thread( void *p_data ) ...@@ -335,9 +335,11 @@ static void *Thread( void *p_data )
/* Render the image and swap the buffers */ /* Render the image and swap the buffers */
vlc_mutex_lock( &p_sys->lock ); vlc_mutex_lock( &p_sys->lock );
if( p_sys->i_nb_samples > 0 ) if( p_sys->i_nb_samples > 0 )
{
p_sys->p_projectm->pcm()->addPCMfloat( p_sys->p_buffer, p_sys->p_projectm->pcm()->addPCMfloat( p_sys->p_buffer,
p_sys->i_nb_samples ); p_sys->i_nb_samples );
p_sys->i_nb_samples = 0;
}
p_sys->p_projectm->renderFrame(); p_sys->p_projectm->renderFrame();
vlc_mutex_unlock( &p_sys->lock ); vlc_mutex_unlock( &p_sys->lock );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment