- /* Commit hardware parameters. */
- if ( ( i_snd_rc = snd_pcm_hw_params( p_sys->p_snd_pcm, p_hw ) ) < 0 )
- {
- msg_Err( p_aout, "unable to commit hardware configuration (%s)",
+ /* Commit hardware parameters. */
+ if ( ( i_snd_rc = snd_pcm_hw_params( p_sys->p_snd_pcm, p_hw ) ) < 0 )
+ {
+ if ( b_retry == VLC_FALSE &&
+ i_snd_pcm_format == SND_PCM_FORMAT_FLOAT)
+ {
+ b_retry = VLC_TRUE;
+ i_snd_pcm_format = SND_PCM_FORMAT_S16;
+ p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+ msg_Warn( p_aout, "unable to commit hardware configuration "
+ "with fl32 samples. Retrying with s16l (%s)", snd_strerror( i_snd_rc ) );
+ }
+ else
+ {
+ msg_Err( p_aout, "unable to commit hardware configuration (%s)",