Commit 015ae8d0 authored by Dylan's avatar Dylan Committed by Jean-Baptiste Kempf

Add hotkey to cycle through audio devices

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0aebd656
...@@ -516,7 +516,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -516,7 +516,8 @@ static void Run( intf_thread_t *p_intf )
{ {
continue; continue;
} }
for( i = 1; i < i_count; i )
for( i = 0; i < i_count; i++ )
{ {
if( val.i_int == list.p_list->p_values[i].i_int ) if( val.i_int == list.p_list->p_values[i].i_int )
{ {
...@@ -528,8 +529,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -528,8 +529,8 @@ static void Run( intf_thread_t *p_intf )
msg_Warn( p_aout, msg_Warn( p_aout,
"invalid current audio device, selecting 0" ); "invalid current audio device, selecting 0" );
var_Set( p_aout, "audio-device", var_Set( p_aout, "audio-device",
list.p_list->p_values[1] ); list.p_list->p_values[0] );
i = 1; i = 0;
} }
else if( i == i_count -1 ) else if( i == i_count -1 )
...@@ -542,15 +543,14 @@ static void Run( intf_thread_t *p_intf ) ...@@ -542,15 +543,14 @@ static void Run( intf_thread_t *p_intf )
else else
{ {
var_Set( p_aout, "audio-device", var_Set( p_aout, "audio-device",
list.p_list->p_values[i1] ); list.p_list->p_values[i+1] );
i; i++;
} }
vout_OSDMessage( VLC_OBJECT(p_input), vout_OSDMessage( VLC_OBJECT(p_input),
DEFAULT_CHAN, DEFAULT_CHAN,
_("Audio Device: %s"), _("Audio Device: %s"),
list2.p_list->p_values[i].psz_string ); list2.p_list->p_values[i].psz_string);
vlc_object_release( p_aout );
} }
else if( i_action == ACTIONID_SUBTITLE_TRACK ) else if( i_action == ACTIONID_SUBTITLE_TRACK )
{ {
...@@ -857,6 +857,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -857,6 +857,7 @@ static void Run( intf_thread_t *p_intf )
{ {
osd_MenuActivate( VLC_OBJECT(p_intf) ); osd_MenuActivate( VLC_OBJECT(p_intf) );
} }
} }
if( p_vout ) if( p_vout )
vlc_object_release( p_vout ); vlc_object_release( p_vout );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment