Permalink
Browse files

The NVDA launcher will no longer show a warning dialog when it can't …

…play the logo sound due to no audio device being available. (issue #6289, PR #6557)
  • Loading branch information...
Leonard de Ruijter authored and jcsteh committed Jan 11, 2017
1 parent 70a460f commit e3336c4af5c076491d023680c2243c677ef27edd
Showing with 3 additions and 13 deletions.
  1. +3 −13 launcher/nvdaLauncher.nsi
View
@@ -86,21 +86,11 @@ execWait "$PLUGINSDIR\app\nvda_noUIAccess.exe $0 -r --launcher" $1
intcmp $1 3 exec +1
SectionEnd
var hmci
Function PlaySound
; Retrieve the file to play
pop $9
System::Call 'msvfw32.dll::MCIWndCreate(i 0, i 0, i 0x0070, t "$9") i .r0'
StrCpy $hmci $0
; Checks format support
SendMessage $hmci 0x0490 0 0 $0
IntCmp $0 0 nosup
; if you want mci window to be hidden
ShowWindow $hmci SW_HIDE
; you can use "STR:play" or "STR:play repeat", but I saw "repeat" problems with midi files
SendMessage $hmci 0x0465 0 "STR:play"
;SendMessage $hmci ${WM_CLOSE} 0 0
nosup:
; The code below is derived from the code example at http://nsis.sourceforge.net/WinAPI:winmm:PlaySound
IntOp $0 "SND_ASYNC" || 1
System::Call 'winmm::PlaySound(t r9, i 0, i r0) b'
FunctionEnd

0 comments on commit e3336c4

Please sign in to comment.