gnu: wayland-protocols: Update to 1.15.
[jackhill/guix/guix.git] / gnu / packages / pulseaudio.scm
CommitLineData
37bfb448 1;;; GNU Guix --- Functional package management for GNU
3246cc91 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4373278e 3;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
9dd61217 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
de1b319d 5;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3cd959a4 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
efc95e7b 7;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
05bdb5e6 8;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
27a976ed 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
37bfb448
LC
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages pulseaudio)
27 #:use-module (guix packages)
28 #:use-module (guix download)
b5b73a82 29 #:use-module ((guix licenses) #:prefix l:)
37bfb448 30 #:use-module (guix build-system gnu)
df71c88c 31 #:use-module (guix build-system python)
b645425f 32 #:use-module (gnu packages)
54ff0b7d 33 #:use-module (gnu packages algebra)
38cf2ba0 34 #:use-module (gnu packages autotools)
37bfb448 35 #:use-module (gnu packages avahi)
54ff0b7d 36 #:use-module (gnu packages check)
b416aadf 37 #:use-module (gnu packages databases)
37bfb448 38 #:use-module (gnu packages glib)
66fb2d23
LC
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages libcanberra)
f6ad09ae 41 #:use-module (gnu packages web)
54ff0b7d 42 #:use-module (gnu packages linux)
37bfb448 43 #:use-module (gnu packages m4)
54ff0b7d 44 #:use-module (gnu packages pkg-config)
0160458b 45 #:use-module (gnu packages xiph))
37bfb448 46
0160458b 47(define-public libsndfile
37bfb448
LC
48 (package
49 (name "libsndfile")
3cd959a4 50 (version "1.0.28")
37bfb448
LC
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "http://www.mega-nerd.com/libsndfile/files/libsndfile-"
54 version ".tar.gz"))
d1a91408
RW
55 (patches (search-patches "libsndfile-armhf-type-checks.patch"
56 "libsndfile-CVE-2017-8361-8363-8365.patch"
1cbdfede
MW
57 "libsndfile-CVE-2017-8362.patch"
58 "libsndfile-CVE-2017-12562.patch"))
37bfb448
LC
59 (sha256
60 (base32
3cd959a4 61 "1afzm7jx34jhqn32clc5xghyjglccam2728yxlx37yj2y0lkkwqz"))))
37bfb448
LC
62 (build-system gnu-build-system)
63 (inputs
64 `(("libvorbis" ,libvorbis)
65 ("libogg" ,libogg)
d7e92b87
ML
66 ("flac" ,flac)))
67 (native-inputs
68 `(("pkg-config" ,pkg-config)))
37bfb448
LC
69 (home-page "http://www.mega-nerd.com/libsndfile/")
70 (synopsis "Reading and writing files containing sampled sound")
71 (description
72 "Libsndfile is a C library for reading and writing files containing
73sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
74one standard library interface.
75
76It was designed to handle both little-endian (such as WAV) and
77big-endian (such as AIFF) data, and to compile and run correctly on
78little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
79as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
80SPARC. Hopefully the design of the library will also make it easy to extend
81for reading and writing new sound file formats.")
82 (license l:gpl2+)))
83
0160458b 84(define-public libsamplerate
37bfb448
LC
85 (package
86 (name "libsamplerate") ; aka. Secret Rabbit Code (SRC)
e1f68c96 87 (version "0.1.9")
37bfb448
LC
88 (source (origin
89 (method url-fetch)
90 (uri (string-append "http://www.mega-nerd.com/SRC/libsamplerate-"
91 version ".tar.gz"))
92 (sha256
93 (base32
e1f68c96 94 "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha"))))
37bfb448 95 (build-system gnu-build-system)
d7e92b87
ML
96 (native-inputs
97 `(("pkg-config" ,pkg-config)))
37bfb448
LC
98 (propagated-inputs
99 `(("libsndfile" ,libsndfile)
100 ("fftw" ,fftw)))
101 (home-page "http://www.mega-nerd.com/SRC/index.html")
102 (synopsis "Audio sample rate conversion library")
103 (description
104 "Secret Rabbit Code (aka. libsamplerate) is a Sample Rate Converter for
105audio. One example of where such a thing would be useful is converting audio
106from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT
107players.
108
109SRC is capable of arbitrary and time varying conversions; from downsampling by
110a factor of 256 to upsampling by the same factor. Arbitrary in this case means
111that the ratio of input and output sample rates can be an irrational
112number. The conversion ratio can also vary with time for speeding up and
113slowing down effects.
114
115SRC provides a small set of converters to allow quality to be traded off
116against computation cost. The current best converter provides a
117signal-to-noise ratio of 145dB with -3dB passband extending from DC to 96% of
118the theoretical best bandwidth for a given pair of input and output sample
e881752c 119rates.")
0802f3a0 120 (license l:bsd-2)))
37bfb448 121
0160458b 122(define-public pulseaudio
37bfb448
LC
123 (package
124 (name "pulseaudio")
bf77a2c8 125 (version "12.0")
37bfb448
LC
126 (source (origin
127 (method url-fetch)
128 (uri (string-append
9dd61217
EF
129 "https://freedesktop.org/software/pulseaudio/releases/"
130 name "-" version ".tar.xz"))
37bfb448
LC
131 (sha256
132 (base32
bf77a2c8 133 "0i248rmwwlfx1r22aiy1wf5lmhixlznyasgqdb5w04gxr6yjshkf"))
3f9d63df
LC
134 (modules '((guix build utils)))
135 (snippet
136 ;; Disable console-kit support by default since it's deprecated
137 ;; anyway.
6cbee49d
MW
138 '(begin
139 (substitute* "src/daemon/default.pa.in"
140 (("load-module module-console-kit" all)
141 (string-append "#" all "\n")))
142 #t))
fc1adab1
AK
143 (patches (search-patches
144 "pulseaudio-fix-mult-test.patch"
145 "pulseaudio-longer-test-timeout.patch"))))
37bfb448
LC
146 (build-system gnu-build-system)
147 (arguments
5a74d239
LC
148 `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
149 "--disable-oss-output"
de1b319d 150 "--enable-bluez5"
5a74d239
LC
151 (string-append "--with-udev-rules-dir="
152 (assoc-ref %outputs "out")
153 "/lib/udev/rules.d"))
277cf3dc
MB
154 #:phases (modify-phases %standard-phases
155 (add-before 'check 'pre-check
156 (lambda _
157 ;; 'tests/lock-autospawn-test.c' wants to create a file
158 ;; under ~/.config/pulse.
159 (setenv "HOME" (getcwd))
160 ;; 'thread-test' needs more time on hydra and on slower
161 ;; machines, so we set the default timeout to 120 seconds.
162 (setenv "CK_DEFAULT_TIMEOUT" "120")
163 #t)))))
37bfb448
LC
164 (inputs
165 ;; TODO: Add optional inputs (GTK+?).
de1b319d
RW
166 `(("alsa-lib" ,alsa-lib)
167 ("bluez" ,bluez)
168 ("sbc" ,sbc)
37bfb448
LC
169 ("speex" ,speex)
170 ("libsndfile" ,libsndfile)
171 ("libsamplerate" ,libsamplerate)
172 ("dbus" ,dbus)
173 ("glib" ,glib)
174 ("intltool" ,intltool)
37bfb448 175 ("m4" ,m4)
3246cc91 176 ("libltdl" ,libltdl)
7569c5cb 177 ("fftwf" ,fftwf)
37bfb448 178 ("avahi" ,avahi)
5a74d239 179 ("eudev" ,eudev) ;for the detection of hardware audio devices
37bfb448 180 ("check" ,check)))
d7e92b87 181 (native-inputs
d624eaaa 182 `(("pkg-config" ,pkg-config)
bf77a2c8 183 ("glib:bin" ,glib "bin")))
37bfb448
LC
184 (propagated-inputs
185 ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
09767fb5 186 `(("libcap" ,libcap)
37bfb448
LC
187 ("gdbm" ,gdbm)))
188 (home-page "http://www.pulseaudio.org/")
189 (synopsis "Sound server")
190 (description
e881752c
AK
191 "PulseAudio is a sound server. It is basically a proxy for your sound
192applications. It allows you to do advanced operations on your sound data as
193it passes between your application and your hardware. Things like
194transferring the audio to a different machine, changing the sample format or
195channel count and mixing several sounds into one are easily achieved using a
196sound server.")
37bfb448
LC
197
198 ;; PulseAudio is LGPLv2+, but some of the optional dependencies (GNU dbm,
199 ;; FFTW, etc.) are GPL'd, so the result is effectively GPLv2+. See
200 ;; 'LICENSE' for details.
201 (license l:gpl2+)))
66fb2d23
LC
202
203(define-public pavucontrol
204 (package
205 (name "pavucontrol")
08cc159a 206 (version "3.0")
66fb2d23
LC
207 (source (origin
208 (method url-fetch)
209 (uri (string-append
5cc3096c 210 "https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-"
66fb2d23
LC
211 version
212 ".tar.xz"))
213 (sha256
214 (base32
08cc159a 215 "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk"))))
66fb2d23 216 (build-system gnu-build-system)
d8c317df
SB
217 (arguments
218 '(#:configure-flags '("CXXFLAGS=-std=c++11"))) ; required by gtkmm
66fb2d23 219 (inputs
c4c4cc05 220 `(("libcanberra" ,libcanberra)
66fb2d23 221 ("gtkmm" ,gtkmm)
c4c4cc05
JD
222 ("pulseaudio" ,pulseaudio)))
223 (native-inputs
224 `(("intltool" ,intltool)
66fb2d23 225 ("pkg-config" ,pkg-config)))
57e7d748 226 (home-page "https://www.freedesktop.org/software/pulseaudio/pavucontrol/")
66fb2d23
LC
227 (synopsis "PulseAudio volume control")
228 (description
229 "PulseAudio Volume Control (pavucontrol) provides a GTK+
230graphical user interface to connect to a PulseAudio server and
231easily control the volume of all clients, sinks, etc.")
232 (license l:gpl2+)))
05bdb5e6
SR
233
234(define-public ponymix
235 (package
236 (name "ponymix")
237 (version "5")
238 (source (origin
239 (method url-fetch)
240 (uri (string-append "https://github.com/falconindy/ponymix/"
241 "archive/" version ".tar.gz"))
242 (sha256
243 (base32
244 "1c0ch98zry3c4ixywwynjid1n1nh4xl4l1p548giq2w3zwflaghn"))
245 (file-name (string-append name "-" version ".tar.gz"))))
246 (build-system gnu-build-system)
247 (arguments
248 `(#:tests? #f ; There is no test suite.
249 #:make-flags (let ((out (assoc-ref %outputs "out")))
250 (list (string-append "DESTDIR=" out)))
251 #:phases
252 (modify-phases %standard-phases
253 (add-after 'unpack 'patch-paths
254 (lambda _
255 (substitute* "Makefile"
256 (("/usr") ""))))
257 (delete 'configure)))) ; There's no configure phase.
258 (inputs
259 `(("pulseaudio" ,pulseaudio)))
260 (native-inputs
261 `(("pkg-config" ,pkg-config)))
262 (home-page "https://github.com/falconindy/ponymix")
263 (synopsis "Console-based PulseAudio mixer")
264 (description "Ponymix is a PulseAudio mixer and volume controller with a
265command-line interface. In addition, it is possible to use named sources and
266sinks.")
267 (license l:expat)))
df71c88c
LF
268
269(define-public pulsemixer
270 (package
271 (name "pulsemixer")
27a976ed 272 (version "1.4.0")
df71c88c
LF
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "https://github.com/GeorgeFilipkin/"
276 "pulsemixer/archive/" version ".tar.gz"))
f45ceced 277 (file-name (string-append name "-" version ".tar.gz"))
df71c88c
LF
278 (sha256
279 (base32
27a976ed 280 "1lpad90ifr2xfldyf39sbwx1v85rif2gm9w774gwwpjv53zfgk1g"))))
df71c88c
LF
281 (build-system python-build-system)
282 (arguments
283 `(#:phases
284 (modify-phases %standard-phases
285 (add-after 'unpack 'patch-path
286 (lambda* (#:key inputs #:allow-other-keys)
287 (let ((pulse (assoc-ref inputs "pulseaudio")))
288 (substitute* "pulsemixer"
289 (("libpulse.so.0")
290 (string-append pulse "/lib/libpulse.so.0")))
291 #t))))))
292 (inputs
293 `(("pulseaudio" ,pulseaudio)))
294 (home-page "https://github.com/GeorgeFilipkin/pulsemixer/")
295 (synopsis "Command-line and curses mixer for PulseAudio")
296 (description "Pulsemixer is a PulseAudio mixer with command-line and
297curses-style interfaces.")
298 (license l:expat)))