- aout_instance_t *p_aout = GetAOut( p_instance, p_e );
- if( p_aout )
- {
- vlc_value_t val;
- int i_ret = -1;
-
- val.i_int = (int) device_type;
- i_ret = var_Set( p_aout, "audio-device", val );
- if( i_ret < 0 )
- {
- libvlc_exception_raise( p_e, "Failed setting audio device" );
- vlc_object_release( p_aout );
- return;
- }
-
- vlc_object_release( p_aout );
- }
+ aout_instance_t *p_aout = GetAOut( mp );
+ if( !p_aout )
+ return;
+ if( var_SetInteger( p_aout, "audio-device", device_type ) < 0 )
+ libvlc_printerr( "Error setting audio device" );
+ vlc_object_release( p_aout );