- var_Change( p_aout, "audio-device", VLC_VAR_CHOICESCOUNT, &val, NULL );
-#if (SND_LIB_VERSION <= 0x010015)
-# warning Please update alsa-lib to version > 1.0.21a.
- var_Create( p_aout->p_libvlc, "alsa-working", VLC_VAR_BOOL );
- if( val.i_int <= 0 )
- {
- if( var_GetBool( p_aout->p_libvlc, "alsa-working" ) )
- dialog_Fatal( p_aout, "ALSA version problem",
- "VLC failed to re-initialize your sound output device.\n"
- "Please update alsa-lib to version 1.0.22 or higher "
- "to fix this issue." );
- }
- else
- var_SetBool( p_aout->p_libvlc, "alsa-working", true );
-#endif
- if( val.i_int <= 0 )
- {
- /* Probe() has failed. */
-#if (SND_LIB_VERSION <= 0x010017)
-# warning Please update alsa-lib to version > 1.0.23.
- var_Create( p_aout->p_libvlc, "alsa-broken", VLC_VAR_BOOL );
- if( !var_GetBool( p_aout->p_libvlc, "alsa-broken" ) )
- {
- var_SetBool( p_aout->p_libvlc, "alsa-broken", true );
- dialog_Fatal( p_aout, "Potential ALSA version problem",
- "VLC failed to initialize your sound output device (if any).\n"
- "Please update alsa-lib to version 1.0.24 or higher "
- "to try to fix this issue." );
- }
-#endif
- msg_Dbg( p_aout, "failed to find a usable ALSA configuration" );
- var_Destroy( p_aout, "audio-device" );
- GetDevices( VLC_OBJECT(p_aout), NULL );
- return VLC_EGENERIC;
- }