From 543d4b7d179849a0e4d7cc46e8cb87ec68ba4052 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 30 Apr 2013 22:32:06 -0400 Subject: [PATCH 1/3] Fix warning in noise.c. Just rearrange the order of #include files so that there's no warning about multiply defined macros. --- nodebox/ext/noise.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodebox/ext/noise.c b/nodebox/ext/noise.c index 4f8a714..e5a4423 100644 --- a/nodebox/ext/noise.c +++ b/nodebox/ext/noise.c @@ -2,6 +2,8 @@ // Based on: Malcolm Kesson, http://www.fundza.com/c4serious/noise/perlin/perlin.html // © 2002-4 Malcolm Kesson. All rights reserved. +#include + #include #include @@ -48,8 +50,6 @@ double _generate(double x, double y, double z) { // ------------------------------------------------------------------------------------- -#include - static PyObject * generate(PyObject *self, PyObject *args) { double x, y, z, d; @@ -84,4 +84,5 @@ int main(int argc, char *argv[]) { Py_Initialize(); initnoise(); return 0; -} \ No newline at end of file +} + From 7b388d5d2ecc9de7bd0f1189bce29ebd696cc99e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 30 Apr 2013 22:33:45 -0400 Subject: [PATCH 2/3] Rename sound example directory for consistency. --- examples/{11_sound => 11-sound}/01-fft.pd | 0 examples/{11_sound => 11-sound}/01-fft.py | 0 examples/{11_sound => 11-sound}/02-in-out.pd | 0 examples/{11_sound => 11-sound}/02-in-out.py | 0 examples/{11_sound => 11-sound}/03-sequencer.pd | 0 examples/{11_sound => 11-sound}/03-sequencer.py | 0 examples/{11_sound => 11-sound}/04-audiosnails.pd | 0 examples/{11_sound => 11-sound}/04-audiosnails.py | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename examples/{11_sound => 11-sound}/01-fft.pd (100%) rename examples/{11_sound => 11-sound}/01-fft.py (100%) rename examples/{11_sound => 11-sound}/02-in-out.pd (100%) rename examples/{11_sound => 11-sound}/02-in-out.py (100%) rename examples/{11_sound => 11-sound}/03-sequencer.pd (100%) rename examples/{11_sound => 11-sound}/03-sequencer.py (100%) rename examples/{11_sound => 11-sound}/04-audiosnails.pd (100%) rename examples/{11_sound => 11-sound}/04-audiosnails.py (100%) diff --git a/examples/11_sound/01-fft.pd b/examples/11-sound/01-fft.pd similarity index 100% rename from examples/11_sound/01-fft.pd rename to examples/11-sound/01-fft.pd diff --git a/examples/11_sound/01-fft.py b/examples/11-sound/01-fft.py similarity index 100% rename from examples/11_sound/01-fft.py rename to examples/11-sound/01-fft.py diff --git a/examples/11_sound/02-in-out.pd b/examples/11-sound/02-in-out.pd similarity index 100% rename from examples/11_sound/02-in-out.pd rename to examples/11-sound/02-in-out.pd diff --git a/examples/11_sound/02-in-out.py b/examples/11-sound/02-in-out.py similarity index 100% rename from examples/11_sound/02-in-out.py rename to examples/11-sound/02-in-out.py diff --git a/examples/11_sound/03-sequencer.pd b/examples/11-sound/03-sequencer.pd similarity index 100% rename from examples/11_sound/03-sequencer.pd rename to examples/11-sound/03-sequencer.pd diff --git a/examples/11_sound/03-sequencer.py b/examples/11-sound/03-sequencer.py similarity index 100% rename from examples/11_sound/03-sequencer.py rename to examples/11-sound/03-sequencer.py diff --git a/examples/11_sound/04-audiosnails.pd b/examples/11-sound/04-audiosnails.pd similarity index 100% rename from examples/11_sound/04-audiosnails.pd rename to examples/11-sound/04-audiosnails.pd diff --git a/examples/11_sound/04-audiosnails.py b/examples/11-sound/04-audiosnails.py similarity index 100% rename from examples/11_sound/04-audiosnails.py rename to examples/11-sound/04-audiosnails.py From 749b8fe0d2fe74f824aa52ec9553d6445b9287a4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 30 Apr 2013 22:52:24 -0400 Subject: [PATCH 3/3] Raise a better exception if there's no PureData. --- nodebox/sound/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodebox/sound/process.py b/nodebox/sound/process.py index 98f7b0f..a67d441 100644 --- a/nodebox/sound/process.py +++ b/nodebox/sound/process.py @@ -228,6 +228,8 @@ def start(self): if self.patch is None \ or not os.path.exists(self.patch): raise PDError, "no PD patch file at '%s'" % self.patch + if not self._path: + raise PDError, "no PD application found" if not os.path.exists(self._path): raise PDError, "no PD application at '%s'" % self._path if not self._process: @@ -286,4 +288,4 @@ def data(self): def stop(self): self._socket.connections -= 1 self._socket.close() - self._socket = None \ No newline at end of file + self._socket = None