Mercurial > mplayer.hg
changeset 36822:95e3f435bc57
Enable setting full audio delay value range.
The option allows a range of -100..100.
Additionally, set the step increment (X11/GTK)
resp. line size (Win32) to 0.1.
author | ib |
---|---|
date | Mon, 24 Feb 2014 10:31:09 +0000 |
parents | 7958d1c69edc |
children | edfa61ced4ad |
files | gui/dialog/preferences.c gui/win32/preferences.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/preferences.c Sun Feb 23 20:43:09 2014 +0000 +++ b/gui/dialog/preferences.c Mon Feb 24 10:31:09 2014 +0000 @@ -682,8 +682,8 @@ hbox8=gtkAddHBox( vbox3,1 ); gtkAddLabel( MSGTR_GUI_AudioDelay":",hbox8 ); - HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.01,0,0 ) ); - HSAudioDelay=gtkAddHScale( HSAudioDelayadj,hbox8,2 ); + HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,0.1,0,0 ) ); + HSAudioDelay=gtkAddHScale( HSAudioDelayadj,hbox8,1 ); label=gtkAddLabel( MSGTR_GUI_Audio,NULL ); gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),0 ),label );
--- a/gui/win32/preferences.c Sun Feb 23 20:43:09 2014 +0000 +++ b/gui/win32/preferences.c Mon Feb 24 10:31:09 2014 +0000 @@ -46,7 +46,7 @@ static HWND vo_driver, ao_driver, prio; int i = 0, j = 0; char procprio[11]; - float x = 10.0, y = 100.0, stereopos, delaypos; + float x = 10.0, y = 10.0, stereopos, delaypos; stereopos = gtkAOExtraStereoMul * x; delaypos = audio_delay * y; @@ -286,6 +286,7 @@ ((LPCREATESTRUCT) lParam) -> hInstance, NULL); SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETRANGE, 1, MAKELONG(-1000, 1000)); + SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_SETLINESIZE, 0, (LPARAM) 1); /* cache */ edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "cache", @@ -581,7 +582,7 @@ gtkAOExtraStereoMul = SendDlgItemMessage(hwnd, ID_TRACKBAR1, TBM_GETPOS, 0, 0) / 10.0; /* audio delay */ - audio_delay = SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_GETPOS, 0, 0) / 100.0; + audio_delay = SendDlgItemMessage(hwnd, ID_TRACKBAR2, TBM_GETPOS, 0, 0) / 10.0; /* cache */ if(SendDlgItemMessage(hwnd, ID_CACHE, BM_GETCHECK, 0, 0) == BST_CHECKED)