+void aout_DecChangePause( aout_instance_t *p_aout, aout_input_t *p_input, bool b_paused, mtime_t i_date )
+{
+ mtime_t i_duration = 0;
+ aout_lock_input( p_aout, p_input );
+ assert( !p_input->b_paused || !b_paused );
+ if( p_input->b_paused )
+ {
+ i_duration = i_date - p_input->i_pause_date;
+ }
+ p_input->b_paused = b_paused;
+ p_input->i_pause_date = i_date;
+ aout_unlock_input( p_aout, p_input );
+
+ if( i_duration != 0 )
+ {
+ aout_lock_mixer( p_aout );
+ for( aout_buffer_t *p = p_input->fifo.p_first; p != NULL; p = p->p_next )
+ {
+ p->start_date += i_duration;
+ p->end_date += i_duration;
+ }
+ aout_unlock_mixer( p_aout );
+ }
+}
+