sndpeek: init at 1.4
This version compiles with ALSA, although other modes of compilation could be imagined.
This commit is contained in:
parent
0beeafc4a9
commit
3090b90830
3 changed files with 71 additions and 0 deletions
56
pkgs/applications/audio/sndpeek/default.nix
Normal file
56
pkgs/applications/audio/sndpeek/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ stdenv, fetchurl, libsndfile, freeglut, alsaLib, mesa, libGLU, libX11, libXmu
|
||||
, libXext, libXi }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sndpeek";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://soundlab.cs.princeton.edu/software/sndpeek/files/sndpeek-${version}.tgz";
|
||||
sha256 = "2d86cf74854fa00dcdc05a35dd92bc4cf6115e87102b17023be5cba9ead8eedf";
|
||||
};
|
||||
sourceRoot = "sndpeek-${version}/src/sndpeek";
|
||||
|
||||
# this patch adds -lpthread to the list of libraries, without it a
|
||||
# symbol-not-found-error is thrown
|
||||
patches = [ ./pthread.patch ];
|
||||
|
||||
buildInputs = [
|
||||
freeglut
|
||||
alsaLib
|
||||
mesa
|
||||
libGLU
|
||||
libsndfile
|
||||
libX11
|
||||
libXmu
|
||||
libXext
|
||||
libXi
|
||||
];
|
||||
buildFlags = "linux-alsa";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv sndpeek $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Real-time 3D animated audio display/playback";
|
||||
longDescription = ''
|
||||
sndpeek is just what it sounds (and looks) like:
|
||||
* real-time 3D animated display/playback
|
||||
* can use mic-input or wav/aiff/snd/raw/mat file (with playback)
|
||||
* time-domain waveform
|
||||
* FFT magnitude spectrum
|
||||
* 3D waterfall plot
|
||||
* lissajous! (interchannel correlation)
|
||||
* rotatable and scalable display
|
||||
* freeze frame! (for didactic purposes)
|
||||
* real-time spectral feature extraction (centroid, rms, flux, rolloff)
|
||||
* available on MacOS X, Linux, and Windows under GPL
|
||||
* part of the sndtools distribution.
|
||||
'';
|
||||
homepage = https://soundlab.cs.princeton.edu/software/sndpeek/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.laikq ];
|
||||
};
|
||||
}
|
13
pkgs/applications/audio/sndpeek/pthread.patch
Normal file
13
pkgs/applications/audio/sndpeek/pthread.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/makefile.alsa b/makefile.alsa
|
||||
index 34fb848..cdaeaec 100644
|
||||
--- a/makefile.alsa
|
||||
+++ b/makefile.alsa
|
||||
@@ -4,7 +4,7 @@ CPP=g++
|
||||
INCLUDES=-I../marsyas/
|
||||
MARSYAS_DIR=../marsyas/
|
||||
CFLAGS=-D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c
|
||||
-LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile
|
||||
+LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile -lpthread
|
||||
|
||||
OBJS=chuck_fft.o RtAudio.o Thread.o sndpeek.o Stk.o \
|
||||
Centroid.o DownSampler.o Flux.o LPC.o MFCC.o RMS.o Rolloff.o \
|
|
@ -19762,6 +19762,8 @@ in
|
|||
|
||||
sidplayfp = callPackage ../applications/audio/sidplayfp { };
|
||||
|
||||
sndpeek = callPackage ../applications/audio/sndpeek { };
|
||||
|
||||
sxhkd = callPackage ../applications/window-managers/sxhkd { };
|
||||
|
||||
mpop = callPackage ../applications/networking/mpop {
|
||||
|
|
Loading…
Reference in a new issue