File: error.patch

package info (click to toggle)
pd-fftease 3.0.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,112 kB
  • sloc: ansic: 14,552; makefile: 208; sh: 93; cpp: 19; perl: 9
file content (549 lines) | stat: -rw-r--r-- 19,320 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
From: Shakeeb Alireza <shakeeb.alireza@rezayat.net>
Date: Mon, 10 Jan 2022 02:20:17 +0300
Subject: error() to pd_error() fix for 0.52 compatibility

Bug: https://github.com/ericlyon/pd-fftease/pull/50
Applied-Upstream: 98e98199774c08d939d26380493d41c038490942

---
 cavoc27~.c          |  8 ++++----
 cavoc~.c            | 10 +++++-----
 dentist~.c          |  4 ++--
 disarrain~.c        | 10 +++++-----
 disarray~.c         |  2 +-
 enrich~.c           |  4 ++--
 fftease_utilities.c |  4 ++--
 mindwarp~.c         |  8 ++++----
 pileup~.c           |  4 ++--
 pvcompand~.c        |  4 ++--
 pvgrain~.c          |  2 +-
 pvharm~.c           |  4 ++--
 pvoc~.c             |  2 +-
 pvtuner~.c          | 10 +++++-----
 pvwarpb~.c          |  4 ++--
 pvwarp~.c           |  4 ++--
 resent~.c           | 12 ++++++------
 residency~.c        |  6 +++---
 18 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/cavoc27~.c b/cavoc27~.c
index b7a0687..3286cea 100644
--- a/cavoc27~.c
+++ b/cavoc27~.c
@@ -135,7 +135,7 @@ void cavoc27_retune(t_cavoc27 *x, t_floatarg min, t_floatarg max)
     t_float *tmpchannel = x->tmpchannel;
     t_float *last_frame = x->last_frame;
     if( max <= 0 || min <= 0 || min > max ){
-        error("bad values for min and max multipliers");
+        pd_error(0, "bad values for min and max multipliers");
         return;
     }
     if( min < .1 )
@@ -182,7 +182,7 @@ void cavoc27_rule (t_cavoc27 *x, t_symbol *msg, short argc, t_atom *argv)
     int i;
     short *rule = x->rule;
     if( argc != 27 ){
-        error("the rule must be size 18");
+        pd_error(0, "the rule must be size 18");
         return;
     }
 
@@ -269,7 +269,7 @@ void cavoc27_init(t_cavoc27 *x)
     short initialized = fft->initialized;
     fftease_init(fft);
     if(! fft->R ){
-        error("cavoc27~: zero sampling rate!");
+        pd_error(0, "cavoc27~: zero sampling rate!");
         return;
     }
     x->frame_duration = (float)fft->D/(float) fft->R;
@@ -601,7 +601,7 @@ void cavoc27_hold_time(t_cavoc27 *x, t_floatarg hold_time)
         return;
     }
     if(! x->frame_duration){
-        error("%s: zero frame duration",OBJECT_NAME);
+        pd_error(0, "%s: zero frame duration",OBJECT_NAME);
         return;
     }
     x->hold_frames = (int) ( (x->hold_time/1000.0) / x->frame_duration);
diff --git a/cavoc~.c b/cavoc~.c
index e1a49fb..d88b3ae 100644
--- a/cavoc~.c
+++ b/cavoc~.c
@@ -134,7 +134,7 @@ void cavoc_mute (t_cavoc *x, t_floatarg toggle)
 void cavoc_retune(t_cavoc *x, t_floatarg min, t_floatarg max)
 {
     if( max <= 0 || min <= 0 || min > max ){
-        error("bad values for min and max multipliers");
+        pd_error(0, "bad values for min and max multipliers");
         return;
     }
     if( min < .1 )
@@ -162,7 +162,7 @@ void cavoc_rule (t_cavoc *x, t_symbol *msg, short argc, t_atom *argv)
     int i;
     short *rule = x->rule;
     if( argc != 8 ){
-        error("the rule must be size 8");
+        pd_error(0, "the rule must be size 8");
         return;
     }
 
@@ -213,7 +213,7 @@ void cavoc_init(t_cavoc *x)
     fft->hi_bin = fft->N2 - 1;
 
     if(! fft->R ){
-        error("zero sampling rate!");
+        pd_error(0, "zero sampling rate!");
         return;
     }
     x->frame_duration = (float)fft->D/(float) fft->R;
@@ -281,7 +281,7 @@ void cavoc_topfreq(t_cavoc *x, t_floatarg tf)
 {
     t_fftease *fft = x->fft;
     if(tf < 100 || tf > fft->R / 2.0){
-        error("%s: top frequency out of range: %f",OBJECT_NAME,  tf);
+        pd_error(0, "%s: top frequency out of range: %f",OBJECT_NAME,  tf);
         return;
     }
     x->topfreq = (float) tf;
@@ -291,7 +291,7 @@ void cavoc_topfreq(t_cavoc *x, t_floatarg tf)
 void cavoc_bottomfreq(t_cavoc *x, t_floatarg bf)
 {
     if(bf < 0 && bf > x->topfreq){
-        error("%s: bottom frequency out of range: %f",OBJECT_NAME,  bf);
+        pd_error(0, "%s: bottom frequency out of range: %f",OBJECT_NAME,  bf);
         return;
     }
     x->bottomfreq = (float) bf;
diff --git a/dentist~.c b/dentist~.c
index 55d3fd9..3469a7d 100644
--- a/dentist~.c
+++ b/dentist~.c
@@ -211,7 +211,7 @@ void dentist_init(t_dentist *x)
     x->max_bin = 1;
 
     if(!x->funda){
-        error("%s: zero sampling rate!",OBJECT_NAME);
+        pd_error(0, "%s: zero sampling rate!",OBJECT_NAME);
         return;
     }
     x->max_bin = (int) (x->topfreq / x->funda);
@@ -438,7 +438,7 @@ void dentist_toothcount(t_dentist *x, t_floatarg newcount)
         return;
     }
     if(nc < 0 || nc > x->fft->N2){
-        error("dentist~: %d out of range",nc);
+        pd_error(0, "dentist~: %d out of range",nc);
         return;
     }
 
diff --git a/disarrain~.c b/disarrain~.c
index bdc0f49..9bdd75d 100644
--- a/disarrain~.c
+++ b/disarrain~.c
@@ -187,13 +187,13 @@ void disarrain_fadetime (t_disarrain *x, t_floatarg f)
         return;
     }
     if(x->frame_duration <= 0.0){
-        // error("%s: frame duration %f is too low", OBJECT_NAME, x->frame_duration);
+        // pd_error(0, "%s: frame duration %f is too low", OBJECT_NAME, x->frame_duration);
         return;
     }
     // duration = f * .001;
     frames = x->interpolation_duration / x->frame_duration;
     if( frames <= 1){
-        error("%s: fadetime too short",OBJECT_NAME);
+        pd_error(0, "%s: fadetime too short",OBJECT_NAME);
         return;
     }
     x->interpolation_frames = frames;
@@ -330,7 +330,7 @@ static void do_disarrain(t_disarrain *x)
             p1 = rand() % max;
             p2 = rand() % max;
             if(p1 < 0 || p1 > max || p2 < 0 || p2 > max){
-                error("disarrain~: bad remaps: %d %d against %d", p1, p2, max);
+                pd_error(0, "disarrain~: bad remaps: %d %d against %d", p1, p2, max);
             } else {
                 temp = shuffle_tmp[p1];
                 shuffle_tmp[ p1 ] = shuffle_tmp[ p2 ];
@@ -625,7 +625,7 @@ void disarrain_isetstate (t_disarrain *x, t_symbol *msg, short argc, t_atom *arg
         if ( ival < N2 && ival >= 0) {
             x->shuffle_mapping[ i ] = ival;
         }else {
-            error("%s: %d is out of range",OBJECT_NAME, ival);
+            pd_error(0, "%s: %d is out of range",OBJECT_NAME, ival);
         }
     }
 
@@ -644,7 +644,7 @@ void disarrain_setstate (t_disarrain *x, t_symbol *msg, short argc, t_atom *argv
         if ( ival < N2 && ival >= 0) {
             x->last_shuffle_mapping[i] = x->shuffle_mapping[i] = ival;
         } else {
-            error("%s: %d is out of range",OBJECT_NAME, ival);
+            pd_error(0, "%s: %d is out of range",OBJECT_NAME, ival);
         }
     }
     return;
diff --git a/disarray~.c b/disarray~.c
index de9d87d..f7489e9 100644
--- a/disarray~.c
+++ b/disarray~.c
@@ -361,7 +361,7 @@ void disarray_setstate (t_disarray *x, t_symbol *msg, short argc, t_atom *argv)
         if ( ival < x->fft->N2 && ival >= 0) {
             x->shuffle_out[ i ] = ival;
         } else {
-            error("%s: %d is out of range",OBJECT_NAME, ival);
+            pd_error(0, "%s: %d is out of range",OBJECT_NAME, ival);
         }
     }
 }
diff --git a/enrich~.c b/enrich~.c
index 3340216..ec1a560 100644
--- a/enrich~.c
+++ b/enrich~.c
@@ -101,7 +101,7 @@ void enrich_highfreq(t_enrich *x, t_floatarg f)
     float curfreq;
 
     if(f < x->lofreq){
-        error("current minimum is %f",x->lofreq);
+        pd_error(0, "current minimum is %f",x->lofreq);
         return;
     }
     if(f > fft->R/2 ){
@@ -122,7 +122,7 @@ void enrich_lowfreq(t_enrich *x, t_floatarg f)
     float curfreq;
 
     if(f > x->hifreq){
-        error("current maximum is %f",x->lofreq);
+        pd_error(0, "current maximum is %f",x->lofreq);
         return;
     }
     if(f < 0 ){
diff --git a/fftease_utilities.c b/fftease_utilities.c
index 58e9a40..e25aa99 100644
--- a/fftease_utilities.c
+++ b/fftease_utilities.c
@@ -53,7 +53,7 @@ int fftease_overlap( int overlap )
         target *= 2;
     }
     if( target != overlap ){
-        error("fftease_overlap: %d is not a legal overlap factor",overlap);
+        pd_error(0, "fftease_overlap: %d is not a legal overlap factor",overlap);
         return 1;
     }
     return overlap;
@@ -66,7 +66,7 @@ int fftease_winfac( int winfac)
         target *= 2;
     }
     if( target != winfac ){
-        // error("%d is not a legal window factor", winfac);
+        // pd_error(0, "%d is not a legal window factor", winfac);
         return 1;
     }
     return winfac;
diff --git a/mindwarp~.c b/mindwarp~.c
index a8e5c0d..61ac33a 100644
--- a/mindwarp~.c
+++ b/mindwarp~.c
@@ -135,13 +135,13 @@ static void do_mindwarp(t_mindwarp *x)
 
     warpFactor = x->warpFactor;
     if(warpFactor <= 0){
-        error("bad warp, resetting");
+        pd_error(0, "bad warp, resetting");
         warpFactor = 1.0;
     }
 
     newLength = (int) ((t_float) N2 / warpFactor);
     if(newLength <= 0){
-        error("bad length: resetting");
+        pd_error(0, "bad length: resetting");
         newLength = 1.0;
     }
 
@@ -216,7 +216,7 @@ static void do_mindwarp(t_mindwarp *x)
 
             // this can happen, crashing external; now fixed.
         if( freqSum <= 0 ) {
-                //      error("bad freq sum, resetting");
+                //      pd_error(0, "bad freq sum, resetting");
             freqSum = 1.0;
         }
         else
@@ -291,7 +291,7 @@ t_int *mindwarp_perform(t_int *w)
 
     if(x->warpFactor <= 0.0625){
         x->warpFactor = 1.0;
-    //     error("%s: zero warp factor is illegal",OBJECT_NAME);
+    //     pd_error(0, "%s: zero warp factor is illegal",OBJECT_NAME);
     }
     if( fft->bufferStatus == EQUAL_TO_MSP_VECTOR ){
         memcpy(input, input + D, (Nw - D) * sizeof(t_float));
diff --git a/pileup~.c b/pileup~.c
index d4de237..824d178 100644
--- a/pileup~.c
+++ b/pileup~.c
@@ -69,7 +69,7 @@ void pileup_highfreq(t_pileup *x, t_floatarg f)
     t_fftease *fft = x->fft;
 
     if(f < x->lo_freq){
-        error("current minimum is %f",x->lo_freq);
+        pd_error(0, "current minimum is %f",x->lo_freq);
         return;
     }
     if(f > fft->R/2 ){
@@ -90,7 +90,7 @@ void pileup_lowfreq(t_pileup *x, t_floatarg f)
     t_fftease *fft = x->fft;
 
     if(f > x->hi_freq){
-        error("current maximum is %f",x->lo_freq);
+        pd_error(0, "current maximum is %f",x->lo_freq);
         return;
     }
     if(f < 0 ){
diff --git a/pvcompand~.c b/pvcompand~.c
index c5be93e..bdcaa29 100644
--- a/pvcompand~.c
+++ b/pvcompand~.c
@@ -121,7 +121,7 @@ void update_thresholds( t_pvcompand *x ) {
             nowamp += x->gstep ;
             ++(x->count);
             if(x->count >= N){
-                error("count exceeds %d",N);
+                pd_error(0, "count exceeds %d",N);
                 x->count = N - 1;
                 break;
             }
@@ -133,7 +133,7 @@ void update_thresholds( t_pvcompand *x ) {
             nowamp -= x->gstep ;
             ++(x->count);
             if(x->count >= N){
-                error("count exceeds %d",N);
+                pd_error(0, "count exceeds %d",N);
                 x->count = N - 1;
                 break;
             }
diff --git a/pvgrain~.c b/pvgrain~.c
index 2912203..2b572e2 100644
--- a/pvgrain~.c
+++ b/pvgrain~.c
@@ -244,7 +244,7 @@ static void do_pvgrain(t_pvgrain *x)
         print_grain = 1;
         dice = fftease_randf(0.,1.);
         if( dice < 0.0 || dice > 1.0 ){
-            error("dice %f out of range", dice);
+            pd_error(0, "dice %f out of range", dice);
         }
         if( selection_probability < 1.0 ){
             if( dice > selection_probability) {
diff --git a/pvharm~.c b/pvharm~.c
index 1d2ca90..438a07f 100644
--- a/pvharm~.c
+++ b/pvharm~.c
@@ -66,7 +66,7 @@ void pvharm_lowfreq(t_pvharm *x, t_floatarg f)
     int R = x->fft->R;
     if(R > 0){
         if(f > x->hifreq){
-            error("%s: minimum cannot exceed current maximum: %f",OBJECT_NAME,x->hifreq);
+            pd_error(0, "%s: minimum cannot exceed current maximum: %f",OBJECT_NAME,x->hifreq);
             return;
         }
         if(f < 0 ){
@@ -87,7 +87,7 @@ void pvharm_highfreq(t_pvharm *x, t_floatarg f)
     int R = x->fft->R;
     if(R > 0){
         if(f < x->lofreq){
-            error("%s: maximum cannot go below current minimum: %f",OBJECT_NAME,x->lofreq);
+            pd_error(0, "%s: maximum cannot go below current minimum: %f",OBJECT_NAME,x->lofreq);
             return;
         }
         if(f > R/2 ){
diff --git a/pvoc~.c b/pvoc~.c
index 93103b1..83a3481 100644
--- a/pvoc~.c
+++ b/pvoc~.c
@@ -68,7 +68,7 @@ void pvoc_highfreq(t_pvoc *x, t_floatarg f)
         f = 0;
     }
     if(f < x->lofreq){
-        error("%s: maximum cannot go below current minimum: %f",OBJECT_NAME,x->lofreq);
+        pd_error(0, "%s: maximum cannot go below current minimum: %f",OBJECT_NAME,x->lofreq);
         return;
     }
     if(f > x->fft->R/2 ){
diff --git a/pvtuner~.c b/pvtuner~.c
index c3a7ac9..8b5b7bd 100644
--- a/pvtuner~.c
+++ b/pvtuner~.c
@@ -221,7 +221,7 @@ void pvtuner_toptune(t_pvtuner *x, t_floatarg f)
     curfreq = 0;
 
     if( f < 0 || f > x->fft->R / 2.0 ){
-        error("frequency %f out of range", f);
+        pd_error(0, "frequency %f out of range", f);
         return;
     }
     while( curfreq < f ) {
@@ -231,7 +231,7 @@ void pvtuner_toptune(t_pvtuner *x, t_floatarg f)
     if( tbin > fft->lo_bin && tbin <= fft->hi_bin ){
         x->hi_tune_bin = tbin;
     } else {
-        error("pvtuner~: bin %d out of range", tbin);
+        pd_error(0, "pvtuner~: bin %d out of range", tbin);
     }
 
 }
@@ -245,7 +245,7 @@ void pvtuner_list (t_pvtuner *x, t_symbol *msg, short argc, t_atom *argv)
     int i = 0;
 
     if( ! atom_getfloatarg(i,argc,argv) ){
-        error("either zero length scale or 0.0 (prohibited) is first value");
+        pd_error(0, "either zero length scale or 0.0 (prohibited) is first value");
         return;
     }
     pvtuner_copy_scale(x);
@@ -277,7 +277,7 @@ void pvtuner_frequency_range(t_pvtuner *x, t_floatarg lo, t_floatarg hi)
 
 
     if( lo >= hi ){
-        error("low frequency must be lower than high frequency");
+        pd_error(0, "low frequency must be lower than high frequency");
         return;
     }
     x->curfreq = 0;
@@ -520,7 +520,7 @@ void pvtuner_update_imported( t_pvtuner *x ){
     int i;
 
     if( pitchgrid[0] <= 0.0){
-        error("%s: illegal first value of scale: %f",OBJECT_NAME,pitchgrid[0]);
+        pd_error(0, "%s: illegal first value of scale: %f",OBJECT_NAME,pitchgrid[0]);
         return;
     }
 
diff --git a/pvwarpb~.c b/pvwarpb~.c
index 379bea3..367ed2d 100644
--- a/pvwarpb~.c
+++ b/pvwarpb~.c
@@ -311,7 +311,7 @@ void pvwarpb_bottomfreq(t_pvwarpb *x, t_floatarg f)
         return;
     }
     if( f < 0 || f > x->fft->R / 2.0 ){
-        error("%s: frequency %f out of range", OBJECT_NAME, f);
+        pd_error(0, "%s: frequency %f out of range", OBJECT_NAME, f);
         return;
     }
     x->lofreq = f;
@@ -327,7 +327,7 @@ void pvwarpb_topfreq(t_pvwarpb *x, t_floatarg f)
         return;
     }
     if( f < x->lofreq || f > x->fft->R / 2.0 ){
-        error("%s: frequency %f out of range", OBJECT_NAME, f);
+        pd_error(0, "%s: frequency %f out of range", OBJECT_NAME, f);
         return;
     }
     x->hifreq = f;
diff --git a/pvwarp~.c b/pvwarp~.c
index 89e6fab..a864c0b 100644
--- a/pvwarp~.c
+++ b/pvwarp~.c
@@ -259,7 +259,7 @@ void pvwarp_bottomfreq(t_pvwarp *x, t_floatarg f)
         return;
     }
     if( f < 0 || f > x->fft->R / 2.0 ){
-        error("%s: frequency %f out of range", OBJECT_NAME, f);
+        pd_error(0, "%s: frequency %f out of range", OBJECT_NAME, f);
         return;
     }
     x->lofreq = f;
@@ -275,7 +275,7 @@ void pvwarp_topfreq(t_pvwarp *x, t_floatarg f)
         return;
     }
     if( f < x->lofreq || f > x->fft->R / 2.0 ){
-        error("%s: frequency %f out of range", OBJECT_NAME, f);
+        pd_error(0, "%s: frequency %f out of range", OBJECT_NAME, f);
         return;
     }
     x->hifreq = f;
diff --git a/resent~.c b/resent~.c
index baefff4..71769b1 100644
--- a/resent~.c
+++ b/resent~.c
@@ -303,7 +303,7 @@ void resent_init(t_resent *x)
         for(i=0; i < x->framecount; i++){
             x->loveboat[i] = (t_float *) calloc((fft->N+2), sizeof(t_float));
             if(x->loveboat[i] == NULL){
-                error("%s: Insufficient Memory!",OBJECT_NAME);
+                pd_error(0, "%s: Insufficient Memory!",OBJECT_NAME);
                 return;
             }
         }
@@ -320,7 +320,7 @@ void resent_init(t_resent *x)
         for(i=0; i < x->framecount; i++){
             x->loveboat[i] = (t_float *) calloc((fft->N+2), sizeof(t_float));
             if(x->loveboat[i] == NULL){
-                error("%s: Insufficient Memory!",OBJECT_NAME);
+                pd_error(0, "%s: Insufficient Memory!",OBJECT_NAME);
                 return;
             }
         }
@@ -557,12 +557,12 @@ void resent_linephase(t_resent *x, t_symbol *msg, short argc, t_atom *argv)
     phase2 = atom_getfloatarg(3, argc, argv) * x->framecount;
 
     if( bin1 > fft->N2 || bin2 > fft->N2 ){
-        error("too high bin number");
+        pd_error(0, "too high bin number");
         return;
     }
     bindiff = bin2 - bin1;
     if( bindiff < 1 ){
-        error("make bin2 higher than bin 1, bye now");
+        pd_error(0, "make bin2 higher than bin 1, bye now");
         return;
     }
     for( i = bin1; i < bin2; i++ ){
@@ -624,12 +624,12 @@ void resent_linespeed(t_resent *x, t_symbol *msg, short argc, t_atom *argv)
     speed2 = atom_getfloatarg(3, argc, argv);
 
     if( bin1 > fft->N2 || bin2 > fft->N2 ){
-        error("too high bin number");
+        pd_error(0, "too high bin number");
         return;
     }
     bindiff = bin2 - bin1;
     if( bindiff < 1 ){
-        error("make bin2 higher than bin 1, bye now");
+        pd_error(0, "make bin2 higher than bin 1, bye now");
         return;
     }
     for( i = bin1; i < bin2; i++ ){
diff --git a/residency~.c b/residency~.c
index a23995b..8e5fb90 100644
--- a/residency~.c
+++ b/residency~.c
@@ -214,7 +214,7 @@ void residency_init(t_residency *x)
         for(i=0;i < x->framecount; i++){
             x->loveboat[i] = (t_float *) calloc((fft->N + 2), sizeof(t_float));
             if(x->loveboat[i] == NULL){
-                error("%s: memory error",OBJECT_NAME);
+                pd_error(0, "%s: memory error",OBJECT_NAME);
                 return;
             }
         }
@@ -233,7 +233,7 @@ void residency_init(t_residency *x)
             for(i=0;i < x->framecount; i++){
                 x->loveboat[i] = (t_float *) calloc((fft->N + 2), sizeof(t_float));
                 if(x->loveboat[i] == NULL){
-                    error("%s: memory error",OBJECT_NAME);
+                    pd_error(0, "%s: memory error",OBJECT_NAME);
                     return;
                 }
             }
@@ -248,7 +248,7 @@ void residency_init(t_residency *x)
         x->failed_init = 0;
     }
     if (fft->D <= 0.0 || fft->R <= 0.0){
-        error("%s: bad decimation size or bad sampling rate - cannot proceed",OBJECT_NAME);
+        pd_error(0, "%s: bad decimation size or bad sampling rate - cannot proceed",OBJECT_NAME);
         post("D: %d R: %d",fft->D, fft->R);
         return;
     }