-aout_input_t *aout_DecNew( audio_output_t *, audio_sample_format_t *,
- const audio_replay_gain_t *, const aout_request_vout_t * );
-void aout_DecDelete ( audio_output_t *, aout_input_t * );
-aout_buffer_t * aout_DecNewBuffer( aout_input_t *, size_t );
-void aout_DecDeleteBuffer( audio_output_t *, aout_input_t *, aout_buffer_t * );
-int aout_DecPlay( audio_output_t *, aout_input_t *, aout_buffer_t *, int i_input_rate );
-int aout_DecGetResetLost( audio_output_t *, aout_input_t * );
-void aout_DecChangePause( audio_output_t *, aout_input_t *, bool b_paused, mtime_t i_date );
-void aout_DecFlush( audio_output_t *, aout_input_t * );
-bool aout_DecIsEmpty( audio_output_t * p_aout, aout_input_t * p_input );
-
-/* Audio output locking */
-
-#if !defined (NDEBUG) \
- && defined __linux__ && (defined (__i386__) || defined (__x86_64__))
-# define AOUT_DEBUG 1
-#endif
-
-#ifdef AOUT_DEBUG
-enum
-{
- OUTPUT_LOCK=1,
- VOLUME_LOCK=2,
-};
-
-void aout_lock_check (unsigned);
-void aout_unlock_check (unsigned);
-
-#else
-# define aout_lock_check( i ) (void)0
-# define aout_unlock_check( i ) (void)0
-#endif
-
-static inline void aout_lock( audio_output_t *p_aout )
-{
- aout_lock_check( OUTPUT_LOCK );
- vlc_mutex_lock( &p_aout->lock );
-}
-
-static inline void aout_unlock( audio_output_t *p_aout )
-{
- aout_unlock_check( OUTPUT_LOCK );
- vlc_mutex_unlock( &p_aout->lock );
-}
-
-static inline void aout_lock_volume( audio_output_t *p_aout )
-{
- aout_lock_check( VOLUME_LOCK );
- vlc_mutex_lock( &aout_owner(p_aout)->volume.lock );
-}
-
-static inline void aout_unlock_volume( audio_output_t *p_aout )
-{
- aout_unlock_check( VOLUME_LOCK );
- vlc_mutex_unlock( &aout_owner(p_aout)->volume.lock );
-}
-
-/* Helpers */
-
-/**
- * This function will safely mark aout input to be restarted as soon as
- * possible to take configuration changes into account */
-static inline void AoutInputsMarkToRestart( audio_output_t *p_aout )
+int aout_DecNew(audio_output_t *, const audio_sample_format_t *,
+ const audio_replay_gain_t *, const aout_request_vout_t *);
+void aout_DecDelete(audio_output_t *);
+int aout_DecPlay(audio_output_t *, block_t *, int i_input_rate);
+int aout_DecGetResetLost(audio_output_t *);
+void aout_DecChangePause(audio_output_t *, bool b_paused, mtime_t i_date);
+void aout_DecFlush(audio_output_t *, bool wait);
+void aout_RequestRestart (audio_output_t *, unsigned);
+
+static inline void aout_InputRequestRestart(audio_output_t *aout)