;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313!\210m\2045\314\315!\203/\316\317\320!\317\321!BC\"\262\321y\210\202*\210\322\323\324\325\300\326$\"AP\207" [nil generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [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: " t] 8 (#$ . 1603)]) (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 "\203N\3052K\306\307 \"\211\203H\310@!\203A\311\312!r\211q\210\313\314\315\316\317!\320\"\321$\216\322@!\210\323 \314V\203?\324\305\325\326 \327\"\"\210*\210\211A\262\202\f\210\3300\206a\n\331\332\333\334\335\336 \"\334\337 \"\334\340\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*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents buffer-size throw split-string buffer-string "[\n ]+" nil "-v" "-R" "-dalsa" format "-d%s" emms-jack-alsa-device "-r%d" "-p%d"] 9 (#$ . 2506)]) (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 (#$ . 3730)]) (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\311\312\313!\314\"\315$\216\316\317\"\2039\320\321\322\"!\320\321\323\"!\320\321\315\"!\202[\316\324\"\203L\320\321\322\"! B\202[\305!b\210c\210\305!`\325\223\210)\210)\211\205f\305!b\262)\207" [emms-jack-load emms-jack-max-usecs emms-jack-spare emms-jack-xruns process-buffer process-mark match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match "^load = \\([^ ]+\\) max usecs: \\([^,]+\\), spare = \\(.+\\)$" string-to-number match-string 1 2 "^**** alsa_pcm: xrun of at least \\([^ ]+\\) msecs$" nil] 10 (#$ . 4486)]) (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 (#$ . 5531) 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 (#$ . 5956) 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 (#$ . 6149) nil]) #@40 Retrieve a list of JACK clients/ports. (defalias 'emms-jack-list #[0 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311\312\313\314\313\315%\210eb\210\313\211m\204\274\316\317!\203`\320\321!\320\310!\322\"\203N\322\"\323\322\"AC\211\262C\"\241\210\202[\323C\211\262DC\"\262\266\202\266\316\324!\203\233\322\325A\"\203\207\322\325A\"\323\322\325\"A\320\321!\320\310!DC\"\241\210\202\266\211\323\325\320\321!\320\310!DDCA\"\241\210\202\266\316\326!\203\266\211\323\211\327C\330\331\332\320\321!\333\"\"\"CA\"\241\210\321y\210\202 \266\202*\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process "jack_lsp" nil t "-cpl" looking-at "^\\([^ :]+\\):\\(.+\\)$" match-string 1 assoc append "^ \\([^ :]+\\):\\(.+\\)$" connections "^ properties: \\(.+\\),$" properties mapcar intern split-string ","] 12 (#$ . 6330)]) #@16 (fn PROGRAM) (defalias 'emms-jack-ports #[257 "\300\301 \"A\207" [assoc emms-jack-list] 4 (#$ . 7276)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-port-connections #[514 "\300\301\300\302!\"A\"A\207" [assoc connections emms-jack-ports] 8 (#$ . 7389)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-port-properties #[514 "\300\301\300\302!\"A\"A\207" [assoc properties emms-jack-ports] 8 (#$ . 7548)]) #@21 (fn PROGRAM PORT) (defalias 'emms-jack-get-direction #[514 "\300\"\301\235@\206\302\235@\206\303\304!\207" [emms-jack-get-port-properties output input error "Neither input nor output port"] 5 (#$ . 7705)]) #@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@@\202+\306\307\310$\207" [functionp emms-remove-if-not emms-jack-list error "No matching JACK clients found" 2 completing-read nil t] 8 (#$ . 7927)]) #@16 (fn STRINGS) (defalias 'emms-jack-unique-port-name #[257 "\300C\301\302\303\304\"\"\242GW\203G\30526@\242G\242GTO\306\307\310\311\312\313\"\314\"\315\316%\"\210\317\2620\203G@\320\242GTO\240\210\202 \242\207" ["" apply min mapcar length not-ok mapc make-byte-code 257 "\300\242\301P\302\300\242GTO\230?\205\303\304\305\"\207" vconcat vector [0 throw not-ok nil] 5 "\n\n(fn STR)" t 0] 12 (#$ . 8240)]) #@43 (fn PROGRAM PROMPT &optional PREDICATE) (defalias 'emms-jack-read-port #[770 "\300!\203\301\302!\"\202\302!\211G\303W\203\211@@\202,\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 (#$ . 8672)]) #@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 (#$ . 8988) (byte-code "\300\301!\302\303\304\"\"\305\"\306=\203\307\202\306\300\303\310#\311\312\313\314\315!\316\"\317\320%\"\302\303\321$\311\312\322\314\315 !\323\"\324\325%#\306=\203SF\202ZF\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-byte-code 257 "\301\302\303\304\305\306\300!\307\"\310\311%A\"\207" vconcat vector [emms-find-if make-byte-code 257 "\300\301\302A\"\235\207" vconcat vector [assoc properties] 5 "\n\n(fn PORT)"] 8 "\n\n(fn PROG)" "Connect %s port %s to %s port: " "\300\301\302A\"A\235\207" [assoc properties] 5 "\n\n(fn PORT)"] 13)]) #@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 (#$ . 10106) (byte-code "\300\301\302\"\303\304\305\"\306#\307\"DG\310W\203@\202\210\311C\312\313\314\315\316\317!\320\"\321\322%\"\210\323\324\242\"\262\211G\310W\203F\211@@\202R\325\304\326#\311\327$\330\313\314\331\316\317!\332\"\333\322%\"\262G\310W\203p@\202\206\325\304\334$\323\335\"\311\327$D\262\266\202\336\"\337=\203\230\340\"\202\234\340\"\207" [emms-jack-read-program "Disconnect: " #[257 "\300\301A\"\207" [emms-find-if #[257 "\300\301A\"\207" [assoc connections] 4 "\n\n(fn PORT)"]] 4 "\n\n(fn PROG)"] emms-jack-read-port format "Disconnect %s port: " #[257 "\300\301A\"\207" [assoc connections] 4 "\n\n(fn PORT)"] emms-jack-get-port-connections 2 nil mapc make-byte-code 257 "\211@\300\242\235?\205\300\301@C\300\242\"\240\207" vconcat vector [append] 5 "\n\n(fn CONN)" mapcar list completing-read "Disconnect %s port %s from: " t emms-remove-if-not "\211@\300\230\207" [] 3 "Disconnect %s port %s from %s port: " cdr emms-jack-get-direction output append] 13)]) (provide 'emms-jack)