;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\314DD\315\316\317%\210\310\320\312\313\321DD\322\316\323%\210\310\324\312\313\325DD\326\316\327%\210\310\330\312\313\331DD\332\316\333%\210\310\334\312\313\335DD\336\316\333%\210\310\337\312\313\340DD\341\316\342%\207" [require emms-compat custom-declare-group emms-jack nil "Jack Audio Connection Kit" :group processes custom-declare-variable emms-jack-rc funcall function #[0 "\300\207" [("~/.jackdrc" "/etc/jackd.conf")] 1] "JACK run control paths." :type repeat emms-jack-use-jack-rc #[0 "\300\207" [t] 1] "If non-nil, try to retrieve jack startup arguments from run control files\nlisted in `jack-rc'. If no rc file is found or this variable is set\nto nil, use the Emacs variables to build the startup args." boolean emms-jack-program #[0 "\300\301!\207" [executable-find "jackd"] 2] "JACK executable path." file emms-jack-sample-rate #[0 "\300\207" [44100] 1] "Default sampling rate for JACK." integer emms-jack-period-size #[0 "\300\207" [128] 1] "Period size to use when launching new JACK process." emms-jack-alsa-device #[0 "\300\207" [nil] 1] "ALSA soundcard to use." (choice (const :tag "Ask" nil) string)] 6) #@48 Read an ALSA device name using the minibuffer. (defalias 'emms-jack-read-alsa-device #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307!\210m\204/\310\311!\203)\312\313\314!\313\315!BC\"\262\315y\210\202*\210\316\317\320\321\300\303$\"AP\207" [nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents "/proc/asound/cards" looking-at "^\\([0-9]\\) \\[.+\\]: \\(.+\\)\n +\\(.*\\)$" append match-string 3 1 "hw:" assoc completing-read "Card: "] 8 (#$ . 1282)]) (defalias 'emms-jack-alsa-device #[0 "\206\301 \207" [emms-jack-alsa-device emms-jack-read-alsa-device] 1]) (byte-code "\300\301\302\303\304DD\305\306\307%\207" [custom-declare-variable emms-jack-output-buffer-name funcall function #[0 "\300\207" [#1="*JACK output*"] 1 #1#] "Output buffer name." :type string] 6) #@82 Return a list of startup arguments to use. First element is the executable path. (defalias 'emms-jack-args #[0 "\203H\3052E\306\307 \"\211\203B\310@!\203;\311\312\313\"r\211q\210\314\315\"\216\316@!\210\317 \320V\2039\321\305\322\323 \324\"\"\210*\210\211A\262\202\f\210\3250\206[\n\326\327\330\331\332\333 \"\331\334 \"\331\335\f\"\257\207" [emms-jack-use-jack-rc emms-jack-rc emms-jack-program emms-jack-sample-rate emms-jack-period-size rc-found mapcar expand-file-name file-exists-p generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents buffer-size 0 throw split-string buffer-string "[\n ]+" nil "-v" "-R" "-dalsa" format "-d%s" emms-jack-alsa-device "-r%d" "-p%d"] 9 (#$ . 2157)]) (byte-code "\300\301\302\303\304DD\305\306\307%\210\300\310\302\303\311DD\312\306\313%\207" [custom-declare-variable emms-jack-set-rtlimits funcall function #[0 "\300\207" [t] 1] "Use set_rtlimits (if available) to gain realtime priorities if -R\nis given in jackd command-line." :type boolean emms-jack-set-rtlimits-program #[0 "\300\301!\207" [executable-find "set_rtlimits"] 2] "Path to set_rtlimits." file] 6) #@13 (fn ARGS) (defalias 'emms-jack-maybe-rtlimits #[257 "\203\302\235\204\303\235\203\304 !\203\305 \306D\"\207\207" [emms-jack-set-rtlimits emms-jack-set-rtlimits-program "-R" "--realtime" file-exists-p append "-r"] 4 (#$ . 3357)]) (defvar emms-jack-process nil) (defvar emms-jack-load 0) (defvar emms-jack-max-usecs 0) (defvar emms-jack-spare 0) (defalias 'emms-jack-output-buffer #[0 "\304!\206#r\305!q\210\306\307\310 !\311 \233\312\240\210\313\314\315\316\317$\210p)\207" [emms-jack-output-buffer-name major-mode mode-name mode-line-format get-buffer get-buffer-create emms-jack-mode "JACK" copy-tree 16 (:eval (format "load:%.2f" emms-jack-load)) add-hook kill-buffer-hook emms-jack-kill nil t] 5]) (defvar emms-jack-xruns nil) #@20 (fn PROC STRING) (defalias 'emms-jack-filter #[514 "r\304!q\210`\305!U\212\306 \307\310\"\216\311\312\"\2032\313\314\315\"!\313\314\316\"!\313\314\317\"!\202T\311\320\"\203E\313\314\315\"! B\202T\305!b\210c\210\305!`\321\223\210)\210)\211\205_\305!b\262)\207" [emms-jack-load emms-jack-max-usecs emms-jack-spare emms-jack-xruns process-buffer process-mark match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] string-match "^load = \\([^ ]+\\) max usecs: \\([^,]+\\), spare = \\(.+\\)$" string-to-number match-string 1 2 3 "^**** alsa_pcm: xrun of at least \\([^ ]+\\) msecs$" nil] 8 (#$ . 4113)]) (defalias 'emms-jack-running-p #[0 "\205\301!\205\302!\303=\207" [emms-jack-process processp process-status run] 2]) (byte-code "\300\301\302\303\304DD\305\306\307%\207" [custom-declare-variable emms-jack-started-hook funcall function #[0 "\300\207" [nil] 1] "Hook run when `emms-jack-start' successfully started a new JACK intance." :type hook] 6) #@25 Start the JACK process. (defalias 'emms-jack-start #[0 "\301 \203 \302\303!\207\304\305\306\307 \310\311 !$\312\313\"\210\314\315!\210\316\307 !\207" [emms-jack-process emms-jack-running-p error "JACK already running" apply start-process "jack" emms-jack-output-buffer emms-jack-maybe-rtlimits emms-jack-args set-process-filter emms-jack-filter run-hooks emms-jack-started-hook switch-to-buffer] 6 (#$ . 5126) nil]) #@42 Kill the currently running JACK process. (defalias 'emms-jack-kill #[0 "\301 \203 \302!\210\303\211\207" [emms-jack-process emms-jack-running-p delete-process nil] 2 (#$ . 5551) nil]) #@15 Restart JACK. (defalias 'emms-jack-restart #[0 "\300 \203\301 \210\302\303!\210\304 \207" [emms-jack-running-p emms-jack-kill sit-for 0 emms-jack-start] 2 (#$ . 5744) nil]) #@40 Retrieve a list of JACK clients/ports. (defalias 'emms-jack-list #[0 "\300\301\302\"r\211q\210\303\304\"\216\305\306\307\302\307\310%\210eb\210\307\211m\204\264\311\312!\203[\313\314!\313\315!\316\"\203I\316\"\317\316\"AC\211\262C\"\241\266\202\256\317C\211\262DC\"\262\266\202\256\311\320!\203\223\321A\236\203\321A\236\317\321\236A\313\314!\313\315!DC\"\241\210\202\256\211\317\321\313\314!\313\315!DDCA\"\241\210\202\256\311\322!\203\256\211\317\211\323C\324\325\326\313\314!\327\"\"\"CA\"\241\210\314y\210\202\266\202*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process "jack_lsp" nil "-cpl" looking-at "^\\([^ :]+\\):\\(.+\\)$" match-string 1 2 assoc append "^ \\([^ :]+\\):\\(.+\\)$" connections "^ properties: \\(.+\\),$" properties mapcar intern split-string ","] 12 (#$ . 5925)]) #@16 (fn PROGRAM) (defalias 'emms-jack-ports #[257 "\300\301 \"A\207" [assoc emms-jack-list] 4 (#$ . 6840)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-port-connections #[514 "\300\301\302!\"A\236A\207" [connections assoc emms-jack-ports] 7 (#$ . 6953)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-port-properties #[514 "\300\301\302!\"A\236A\207" [properties assoc emms-jack-ports] 7 (#$ . 7109)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-direction #[514 "\300\"\301>@\206\302>@\206\303\304!\207" [emms-jack-get-port-properties output input error "Neither input nor output port"] 5 (#$ . 7263)]) #@35 (fn PROMPT &optional PREDICATE) (defalias 'emms-jack-read-program #[513 "\300!\203\301\302 \"\202\302 \211\204\303\304!\210\211G\305W\203#\211@@\207\306\307\310$\207" [functionp emms-remove-if-not emms-jack-list error "No matching JACK clients found" 2 completing-read nil t] 8 (#$ . 7479)]) #@16 (fn STRINGS) (defalias 'emms-jack-unique-port-name #[257 "\300C\301\302\303\304\"\"\242GW\203=\3052,@\242G\242GTO\306\307\310#\"\210\311\2620\203=@\312\242GTO\240\210\202 \242\207" ["" apply min mapcar length not-ok mapc make-closure #[257 "\300\242\301P\302\300\242GTO\230?\205\303\304\305\"\207" [V0 V1 0 throw not-ok nil] 5 "\n\n(fn STR)"] t 0] 9 (#$ . 7790)]) #@43 (fn PROGRAM PROMPT &optional PREDICATE) (defalias 'emms-jack-read-port #[770 "\300!\203\301\302!\"\202\302!\211G\303W\203\211@@\207\304\305\306\307\310\311\"!%\207" [functionp emms-remove-if-not emms-jack-ports 2 completing-read nil t emms-jack-unique-port-name mapcar car] 13 (#$ . 8183)]) #@186 Connect FROM-PROGRAM's output port FROM-PORT to TO-PROGRAM's input port TO-PORT. If called interactively, the direction does not matter. (fn FROM-PROGRAM FROM-PORT TO-PROGRAM TO-PORT) (defalias 'emms-jack-connect #[1028 "\300\301\302\211\211\303\304\n\n#\303\304  #&\211\305U\205&\306\307%\207" [call-process "jack_connect" nil format "%s:%s" 0 message "JACK: Connected %s:%s to %s:%s"] 14 (#$ . 8497) (byte-code "\300\301!\302\303\304\"\"\305\"\306=\203\307\202\306\300\303\310#\311\312\"\"\302\303\313$\311\314\"#\306=\203@F\207F\207" [emms-jack-read-program "Connect: " emms-jack-read-port format "Connect %s port: " emms-jack-get-direction input output "Connect %s port %s to: " make-closure #[257 "\301\302\303\300\"A\"\207" [V0 emms-find-if make-closure #[257 "\300\301A\236\235\207" [V0 properties] 4 "\n\n(fn PORT)"]] 5 "\n\n(fn PROG)"] "Connect %s port %s to %s port: " #[257 "\300\301A\236A\235\207" [V0 properties] 4 "\n\n(fn PORT)"]] 11)]) #@191 Disconnect FROM-PROGRAM's output port FROM-PORT from TO-PROGRAM's input port TO-PORT. If called interactively, the direction is not relevant. (fn FROM-PROGRAM FROM-PORT TO-PROGRAM TO-PORT) (defalias 'emms-jack-disconnect #[1028 "\300\301\302\211\211\303\304\n\n#\303\304  #&\211\305U\205&\306\307%\207" [call-process "jack_disconnect" nil format "%s:%s" 0 message "JACK: Disconnected %s:%s from %s:%s"] 14 (#$ . 9506) (byte-code "\300\301\302\"\303\304\305\"\306#\307\"DG\310W\203@\202x\311C\312\313\314\"\"\210\315\316\242\"\262\211G\310W\203=\211@@\202I\317\304\320#\311\321$\322\313\323\"\"\262G\310W\203`@\266\202\202x\317\304\324$\315\325\"\311\321$D\262\266\202\326\"\327=\203\206\330\"\207\330\"\207" [emms-jack-read-program "Disconnect: " #[257 "\300\301A\"\207" [emms-find-if #[257 "\300A\236\207" [connections] 3 "\n\n(fn PORT)"]] 4 "\n\n(fn PROG)"] emms-jack-read-port format "Disconnect %s port: " #[257 "\300A\236\207" [connections] 3 "\n\n(fn PORT)"] emms-jack-get-port-connections 2 nil mapc make-closure #[257 "\211@\300\242\235?\205\300\301@C\300\242\"\240\207" [V0 append] 5 "\n\n(fn CONN)"] mapcar list completing-read "Disconnect %s port %s from: " t emms-remove-if-not #[257 "\211@\300\230\207" [V0] 3 "\n\n(fn CONN)"] "Disconnect %s port %s from %s port: " cdr emms-jack-get-direction output append] 12)]) (provide 'emms-jack)