File tree Expand file tree Collapse file tree 5 files changed +15
-16
lines changed Expand file tree Collapse file tree 5 files changed +15
-16
lines changed Original file line number Diff line number Diff line change 1212 </a>
1313</p >
1414
15- * windows needs work
16-
1715## it supports audio backends
1816- PortAudio (linux/macOS/* windblows** )
1917- PulseAudio (parec/FFmpeg)
2018- AVFoundation (macOS FFmpeg)
19+ - ALSA (linux FFmpeg)
2120- DirectShow (windblows FFmpeg)
22- - ALSA (linux/FFmpeg)
21+
22+ * portaudio is difficult on windows, so by default it is disabled on windows.
2323
2424## it depends on
2525
3030 - github.com/lawl/pulseaudio
3131 - gonum.org/v1/gonum
3232
33- - c libraries (optional, disable with ` CGO_ENABLED=0 ` )
34- - fftw (fftw3)
33+ - c libraries (optional, disable all with ` CGO_ENABLED=0 ` )
34+ - fftw (fftw3) (disable with `-tags nofftw`)
3535 - portaudio (portaudio-2.0) (disable with `-tags noportaudio`)
3636
3737- binaries
4444# get source
4545git clone https://github.com/noriah/catnip.git
4646
47- # cd to source
47+ # cd to dir
4848cd catnip
4949
5050# build and install catnip
@@ -53,8 +53,11 @@ go install
5353# without cgo
5454CGO_ENABLED=0 go install
5555
56- # without portaudio
56+ # without portaudio on linux/unix/macOS
5757go install -tags noportaudio
58+
59+ # with portaudio on windows
60+ go install -tags portonwin
5861```
5962
6063## run it
Original file line number Diff line number Diff line change 1- //go:build cgo && !windows
1+ //go:build cgo && !windows && !nofftw
22
33package fft
44
Original file line number Diff line number Diff line change 1- //go:build !cgo || windows
1+ //go:build !cgo || nofftw || windows
22
33package fft
44
5- import (
6- "gonum.org/v1/gonum/dsp/fourier"
7- )
5+ import "gonum.org/v1/gonum/dsp/fourier"
86
97// FFTW is false if Catnip is not built with cgo. It will use gonum instead.
108const FFTW = false
Original file line number Diff line number Diff line change 1- //go:build (cgo && !windows && !noportaudio) || (cgo && windows && enablePortaudio )
1+ //go:build (cgo && !windows && !noportaudio) || (cgo && windows && portonwin )
22
33package main
44
Original file line number Diff line number Diff line change 11package util
22
3- import (
4- "math"
5- )
3+ import "math"
64
75// MovingWindow is a moving window
86type MovingWindow struct {
You can’t perform that action at this time.
0 commit comments