Skip to content

Commit b07dcfd

Browse files
author
Frederik De Bleser
committed
Merge pull request #4 from QuLogic/master
Minor fixes
2 parents 2427499 + 749b8fe commit b07dcfd

File tree

10 files changed

+7
-4
lines changed

10 files changed

+7
-4
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nodebox/ext/noise.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Based on: Malcolm Kesson, http://www.fundza.com/c4serious/noise/perlin/perlin.html
33
// © 2002-4 Malcolm Kesson. All rights reserved.
44

5+
#include <Python.h>
6+
57
#include <math.h>
68
#include <stdio.h>
79

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

4951
// -------------------------------------------------------------------------------------
5052

51-
#include <Python.h>
52-
5353
static PyObject *
5454
generate(PyObject *self, PyObject *args) {
5555
double x, y, z, d;
@@ -84,4 +84,5 @@ int main(int argc, char *argv[]) {
8484
Py_Initialize();
8585
initnoise();
8686
return 0;
87-
}
87+
}
88+

nodebox/sound/process.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ def start(self):
228228
if self.patch is None \
229229
or not os.path.exists(self.patch):
230230
raise PDError, "no PD patch file at '%s'" % self.patch
231+
if not self._path:
232+
raise PDError, "no PD application found"
231233
if not os.path.exists(self._path):
232234
raise PDError, "no PD application at '%s'" % self._path
233235
if not self._process:
@@ -286,4 +288,4 @@ def data(self):
286288
def stop(self):
287289
self._socket.connections -= 1
288290
self._socket.close()
289-
self._socket = None
291+
self._socket = None

0 commit comments

Comments
 (0)