Skip to content

Commit 6ac6e86

Browse files
committed
CGO deps disabled by default. see README.md for instructions on enabling.
1 parent aee9e07 commit 6ac6e86

File tree

5 files changed

+14
-23
lines changed

5 files changed

+14
-23
lines changed

README.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
</p>
1414

1515
## it supports audio backends
16-
- PortAudio (linux/macOS/*windblows**)
17-
- PulseAudio (parec/FFmpeg)
18-
- AVFoundation (macOS FFmpeg)
1916
- ALSA (linux FFmpeg)
17+
- AVFoundation (macOS FFmpeg)
2018
- DirectShow (windblows FFmpeg)
21-
22-
*portaudio is difficult on windows. by default it is disabled on windows.
19+
- PortAudio (linux/macOS/windblows)
20+
- PulseAudio (parec/FFmpeg)
2321

2422
## it depends on
2523

@@ -30,14 +28,14 @@
3028
- github.com/lawl/pulseaudio
3129
- gonum.org/v1/gonum
3230

33-
- c libraries (optional, disable all with `CGO_ENABLED=0`)
34-
- fftw (fftw3) (disable with `-tags nofftw`)
35-
- portaudio (portaudio-2.0) (disable with `-tags noportaudio`)
36-
3731
- binaries
3832
- ffmpeg (required for FFmpeg backends)
3933
- parec (required for PulseAudio backend with parec)
4034

35+
- c libraries (optional, requires CGO - `CGO_ENABLED=1`)
36+
- fftw (fftw3) (enable with `-tags withfftw`)
37+
- portaudio (portaudio-2.0) (enable with `-tags withportaudio`)
38+
4139
## get it
4240

4341
```sh
@@ -50,17 +48,11 @@ cd catnip
5048
# build and install catnip
5149
go install
5250

53-
# without cgo
54-
CGO_ENABLED=0 go install
55-
56-
# without portaudio on linux/unix/macOS
57-
go install -tags noportaudio
58-
59-
# with portaudio on windows
60-
go install -tags portonwin
51+
# with portaudio
52+
go install -tags withportaudio
6153

62-
# with fftw3 on windows
63-
go install -tags fftwonwin
54+
# with fftw3
55+
go install -tags withfftw
6456
```
6557

6658
## run it

catnip.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ func catnip(cfg *config) error {
181181
// - super smooth detail view
182182
func newZeroConfig() config {
183183
return config{
184-
backend: "portaudio",
185184
sampleRate: 44100,
186185
sampleSize: 1024,
187186
smoothFactor: 80.15,

fft/fftw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build cgo && ((!windows && !nofftw) || (windows && fftwonwin))
1+
//go:build cgo && withfftw
22

33
package fft
44

fft/gonum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !cgo || nofftw || (windows && !fftwonwin)
1+
//go:build !cgo || !withfftw
22

33
package fft
44

portaudio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build cgo && ((!windows && !noportaudio) || (windows && portonwin))
1+
//go:build cgo && withportaudio
22

33
package main
44

0 commit comments

Comments
 (0)