;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\207" [require cl-lib deferred custom-declare-group sound-wav nil "Play wav file" :group sound] 6) #@48 Is powershell available to play windows files? (defalias 'sound-wav--powershell-sound-player-p #[nil "\301\302!\205 \303>\207" [system-type executable-find "powershell" (windows-nt ms-dos)] 2 (#$ . 249)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put sound-wav--powershell-sound-player-p speed -1 put byte-optimizer byte-compile-inline-expand] 5) (defalias 'sound-wav--do-play-by-powershell #[(files) "\302\303\304\305\306\307 \310##\211)\207" [it files nil deferred:process "powershell" "-c" mapconcat #[(file) "\301\302\"\207" [file format "(New-Object Media.SoundPlayer \"%s\").PlaySync()"] 3] ";"] 8]) (defalias 'sound-wav--window-media-player-p #[nil "\301\302!\205 \303>\207" [system-type executable-find "ruby" (windows-nt ms-dos)] 2]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put sound-wav--window-media-player-p speed -1 put byte-optimizer byte-compile-inline-expand] 5) (defalias 'sound-wav--do-play-by-wmm #[(files) "\302\303\304\305\306\307\310\311 \312#%\211)\207" [it files nil deferred:process "ruby" "-r" "Win32API" "-e" mapconcat #[(file) "\301\302\"\207" [file format "Win32API.new('winmm','PlaySound','ppl','i').call('%s',nil,0)"] 3] ";"] 10]) (defalias 'sound-wav--do-play-by-afplay #[(files) "\302\303\304\305\306\307 \310#\"!\211)\207" [it files nil deferred:process-shell format "echo \"%s\" | awk '{ print \"afplay \" $0 }' | bash" mapconcat identity "\n"] 8]) (defalias 'sound-wav--do-play-by-aplay #[(files) "\302\303\304\305 #\211)\207" [it files nil apply deferred:process "aplay"] 5]) (defalias 'sound-wav--do-play #[(files) "\302\303!\203\304>\203\305 !\207\302\306!\203 \307>\203 \310 !\207\302\311!\203*\312 !\207\302\313!\2034\314 !\207\315\316!\207" [system-type files executable-find "powershell" (windows-nt ms-dos) sound-wav--do-play-by-powershell "ruby" (windows-nt ms-dos) sound-wav--do-play-by-wmm "afplay" sound-wav--do-play-by-afplay "aplay" sound-wav--do-play-by-aplay error "Not found wav player on your system!!"] 2]) (defalias 'sound-wav--validate-files #[(files) "\304\211 :\203 @\305\n!\203\n B A\211\202 \237+\207" [files #1=#:--cl-var-- file #2=#:--cl-var-- nil file-exists-p] 3]) #@20 (fn &rest FILES) (defalias 'sound-wav-play #[(&rest files) "\302!\204\f\303\304!\210\305 !)\207" [files valid-files sound-wav--validate-files error "No valid files!!" sound-wav--do-play] 2 (#$ . 2464)]) (provide 'sound-wav)