Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions nodebox/ext/noise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Python.h>

#include <math.h>
#include <stdio.h>

Expand Down Expand Up @@ -48,8 +50,6 @@ double _generate(double x, double y, double z) {

// -------------------------------------------------------------------------------------

#include <Python.h>

static PyObject *
generate(PyObject *self, PyObject *args) {
double x, y, z, d;
Expand Down Expand Up @@ -84,4 +84,5 @@ int main(int argc, char *argv[]) {
Py_Initialize();
initnoise();
return 0;
}
}

4 changes: 3 additions & 1 deletion nodebox/sound/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -286,4 +288,4 @@ def data(self):
def stop(self):
self._socket.connections -= 1
self._socket.close()
self._socket = None
self._socket = None