Description: replace error() with pd_error() error() has been removed and -Werror=implicit-function-declaration leads to FTBFS Author: IOhannes m zmölnig Origin: Debian Forwarded: no Last-Update: 2024-03-16 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- pd-unauthorized.orig/audience~.c +++ pd-unauthorized/audience~.c @@ -513,7 +513,7 @@ x->x_inputs_y = (t_int *) getbytes( x->x_nbinputs*sizeof(t_int) ); if ( !x->x_inputs || !x->x_inputs_x || !x->x_inputs_y ) { - error( "audience~ : fatal : could not create new object" ); + pd_error(x, "audience~ : fatal : could not create new object" ); return; } for ( bi=0; bix_nbinputs; bi++ ) @@ -550,7 +550,7 @@ x->x_outputs_y = (t_int *) getbytes( x->x_nboutputs*sizeof(t_int) ); if ( !x->x_outputs || !x->x_outputs_x || !x->x_outputs_y ) { - // error( "audience~ : fatal : could not create new object" ); + // pd_error(x, "audience~ : fatal : could not create new object" ); return; } for ( bi=0; bix_nboutputs; bi++ ) @@ -937,7 +937,7 @@ } else { - error( "audience~ : delay : %d : wrong readpos !!! : %d >= %d or < 0", delay, readpos, x->x_audiobuffersize ); + pd_error(x, "audience~ : delay : %d : wrong readpos !!! : %d >= %d or < 0", delay, readpos, x->x_audiobuffersize ); } op++; } --- pd-unauthorized.orig/blinkenlights.c +++ pd-unauthorized/blinkenlights.c @@ -767,7 +767,7 @@ if ( ( x->x_filed = sys_fopen( sfile->s_name, "r" ) ) == NULL ) { - error( "blinkenlights : cannot open >%s<", sfile->s_name); + pd_error(x, "blinkenlights : cannot open >%s<", sfile->s_name); return; } post( "blinkenlights : opened >%s<", sfile->s_name); --- pd-unauthorized.orig/formant~.c +++ pd-unauthorized/formant~.c @@ -87,7 +87,7 @@ if ( x->x_size <= 0 || x->x_central_freq <= 0 || x->x_filter_width <= 0 || x->x_skirt_width <= 0 ) { - error( "formant~ : error generating data : negative or null parameter(s)" ); + pd_error(x, "formant~ : error generating data : negative or null parameter(s)" ); return -1; } @@ -229,7 +229,7 @@ if ( fsize <= 0 || ffreq <= 0 || ffwidth <= 0 || fswidth <= 0 ) { - error( "formant~ : missing or negative creation arguments" ); + pd_error(x, "formant~ : missing or negative creation arguments" ); return NULL; } --- pd-unauthorized.orig/mp3amp~.c +++ pd-unauthorized/mp3amp~.c @@ -340,7 +340,7 @@ } else // sorry, it will be ignored { - // error( "mp3amp~: incomplete frame...ignored"); + // pd_error(x, "mp3amp~: incomplete frame...ignored"); // x->x_offset = 0; // x->x_inwriteposition = 0; // x->x_inframes = 0; @@ -431,7 +431,7 @@ if ( ret == 0 && ( x->x_inbuffersize-x->x_inwriteposition != 0 ) ) { - error("mp3amp~: stream lost..."); + pd_error(x, "mp3amp~: stream lost..."); mp3amp_disconnect(x); } else @@ -617,14 +617,14 @@ if (x->x_fd >= 0) { - error("mp3amp~: already connected"); + pd_error(x, "mp3amp~: already connected"); return NULL; } sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) { - error("mp3amp~: internal error while attempting to open socket"); + pd_error(x, "mp3amp~: internal error while attempting to open socket"); return NULL; } @@ -646,7 +646,7 @@ post("mp3amp~: connecting to http:/%s:%d/%s", x->x_hostname, x->x_port, x->x_mountpoint ); if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0) { - error("mp3amp~: connection failed!\n"); + pd_error(x, "mp3amp~: connection failed!\n"); sys_closesocket(sockfd); return NULL; } @@ -661,7 +661,7 @@ ret = select(sockfd + 1, &fdset, NULL, NULL, &tv); if(ret != 0) { - error("mp3amp~: can not read from socket"); + pd_error(x, "mp3amp~: can not read from socket"); sys_closesocket(sockfd); return NULL; } @@ -697,7 +697,7 @@ { if( ( ret = recv(sockfd, request+offset, STRBUF_SIZE, MSG_NOSIGNAL) ) <0) { - error("mp3amp~: no response from server"); + pd_error(x, "mp3amp~: no response from server"); #ifndef _MSC_VER perror( "recv" ); #endif @@ -747,7 +747,7 @@ } if( !(sptr = strstr(request, "200")) && !relocate ) { - error("mp3amp~: cannot connect to the (default) stream"); + pd_error(x, "mp3amp~: cannot connect to the (default) stream"); return NULL; } @@ -1029,7 +1029,7 @@ } if (relocate) { - error("mp3amp~: too many HTTP relocations"); + pd_error(x, "mp3amp~: too many HTTP relocations"); return NULL; } post("mp3amp~: connected to http://%s:%d/%s", hp->h_name, portno, x->x_mountpoint); --- pd-unauthorized.orig/mp3cast~.c +++ pd-unauthorized/mp3cast~.c @@ -142,7 +142,7 @@ if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf)) #endif { - error("not enough memory!"); + pd_error(x, "not enough memory!"); return; } @@ -161,7 +161,7 @@ } x->x_start = 1; } - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3cast~: buffers overlap!"); + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3cast~: buffers overlap!"); i = MY_MP3_MALLOC_IN_SIZE - x->x_outp; @@ -199,7 +199,7 @@ if(x->x_mp3size<0) { lame_close( x->lgfp ); - error("mp3cast~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); + pd_error(x, "mp3cast~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); x->x_lame = -1; } } @@ -214,7 +214,7 @@ err = send(x->x_fd, x->x_mp3outbuf, x->x_mp3size, 0); if(err < 0) { - error("mp3cast~: could not send encoded data to server (%d)", err); + pd_error(x, "mp3cast~: could not send encoded data to server (%d)", err); lame_close( x->lgfp ); x->x_lame = -1; #ifdef _WIN32 @@ -225,7 +225,7 @@ x->x_fd = -1; outlet_float(x->x_obj.ob_outlet, 0); } - if((err > 0)&&(err != x->x_mp3size))error("mp3cast~: %d bytes skipped", x->x_mp3size - err); + if((err > 0)&&(err != x->x_mp3size))pd_error(x, "mp3cast~: %d bytes skipped", x->x_mp3size - err); } @@ -358,7 +358,7 @@ dll=LoadLibrary("lame_enc.dll"); if(!dll) { - error("mp3cast~: error loading lame_enc.dll"); + pd_error(x, "mp3cast~: error loading lame_enc.dll"); closesocket(x->x_fd); x->x_fd = -1; outlet_float(x->x_obj.ob_outlet, 0); @@ -467,14 +467,14 @@ if (x->x_fd >= 0) { - error("mp3cast~: already connected"); + pd_error(x, "mp3cast~: already connected"); return; } sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) { - error("mp3cast~: internal error while attempting to open socket"); + pd_error(x, "mp3cast~: internal error while attempting to open socket"); return; } @@ -496,7 +496,7 @@ post("mp3cast~: connecting to port %d", portno); if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0) { - error("mp3cast~: connection failed!\n"); + pd_error(x, "mp3cast~: connection failed!\n"); #ifdef _WIN32 closesocket(sockfd); #else @@ -514,7 +514,7 @@ ret = select(sockfd + 1, &fdset, NULL, NULL, &tv); if(ret < 0) { - error("mp3cast~: can not read from socket"); + pd_error(x, "mp3cast~: can not read from socket"); #ifdef _WIN32 closesocket(sockfd); #else @@ -526,7 +526,7 @@ ret = select(sockfd + 1, NULL, &fdset, NULL, &tv); if(ret < 0) { - error("mp3cast~: can not write to socket"); + pd_error(x, "mp3cast~: can not write to socket"); close(sockfd); return; } @@ -579,7 +579,7 @@ send(sockfd, buf, strlen(buf), 0); if(sprintf(resp, "%d", x->x_bitrate) == -1) /* convert int to a string */ { - error("mp3cast~: wrong bitrate"); + pd_error(x, "mp3cast~: wrong bitrate"); } send(sockfd, resp, strlen(resp), 0); buf = "\nicy-pub:"; @@ -617,7 +617,7 @@ send(sockfd, buf, strlen(buf), 0); if(sprintf(resp, "%d", x->x_bitrate) == -1) /* convert int to a string */ { - error("mp3cast~: wrong bitrate"); + pd_error(x, "mp3cast~: wrong bitrate"); } send(sockfd, resp, strlen(resp), 0); @@ -711,7 +711,7 @@ /* bitrate */ if(sprintf(resp, "\r\nice-audio-info: bitrate=%d", x->x_bitrate) == -1) { - error("shoutcast~: could not create audio-info"); + pd_error(x, "shoutcast~: could not create audio-info"); } send(sockfd, resp, strlen(resp), 0); /* description */ @@ -953,7 +953,7 @@ x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */ if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */ { - error("out of memory!"); + pd_error(x, "out of memory!"); } x->x_bytesbuffered = 0; x->x_inp = 0; --- pd-unauthorized.orig/mp3fileout~.c +++ pd-unauthorized/mp3fileout~.c @@ -434,14 +434,14 @@ if (x->x_socket >= 0) { - error("mp3fileout~: already connected"); + pd_error(x, "mp3fileout~: already connected"); return; } sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) { - error("mp3fileout~: internal error while attempting to open socket"); + pd_error(x, "mp3fileout~: internal error while attempting to open socket"); return; } @@ -467,7 +467,7 @@ post("mp3fileout~: connecting to port %d", portno); if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0) { - error("mp3fileout~: connection failed!\n"); + pd_error(x, "mp3fileout~: connection failed!\n"); #ifdef _WIN32 closesocket(sockfd); #else --- pd-unauthorized.orig/mp3streamout~.c +++ pd-unauthorized/mp3streamout~.c @@ -127,7 +127,7 @@ if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf)) #endif { - error("not enough memory!"); + pd_error(x, "not enough memory!"); return; } @@ -146,7 +146,7 @@ } x->x_start = 1; } - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3streamout~: buffers overlap!"); + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3streamout~: buffers overlap!"); i = MY_MP3_MALLOC_IN_SIZE - x->x_outp; @@ -186,7 +186,7 @@ if(x->x_mp3size<0) { lame_close( x->lgfp ); - error("mp3streamout~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); + pd_error(x, "mp3streamout~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); x->x_lame = -1; } } @@ -211,7 +211,7 @@ count = send(x->x_fd, x->x_mp3outbuf, x->x_mp3size, MSG_NOSIGNAL); if(count < 0) { - error("mp3streamout~: could not send encoded data to the peer (%d)", count); + pd_error(x, "mp3streamout~: could not send encoded data to the peer (%d)", count); lame_close( x->lgfp ); x->x_lame = -1; #ifdef _WIN32 @@ -232,7 +232,7 @@ } if((count > 0)&&(count != x->x_mp3size)) { - error("mp3streamout~: %d bytes skipped", x->x_mp3size - count); + pd_error(x, "mp3streamout~: %d bytes skipped", x->x_mp3size - count); } } @@ -366,7 +366,7 @@ dll=LoadLibrary("lame_enc.dll"); if(dll==NULL) { - error("mp3streamout~: error loading lame_enc.dll"); + pd_error(x, "mp3streamout~: error loading lame_enc.dll"); closesocket(x->x_fd); x->x_fd = -1; outlet_float(x->x_obj.ob_outlet, 0); @@ -428,14 +428,14 @@ if (x->x_fd >= 0) { - error("mp3streamout~: already connected"); + pd_error(x, "mp3streamout~: already connected"); return; } sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) { - error("mp3streamout~: internal error while attempting to open socket"); + pd_error(x, "mp3streamout~: internal error while attempting to open socket"); return; } @@ -461,7 +461,7 @@ post("mp3streamout~: connecting to port %d", portno); if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0) { - error("mp3streamout~: connection failed!\n"); + pd_error(x, "mp3streamout~: connection failed!\n"); #ifdef _WIN32 closesocket(sockfd); #else @@ -618,7 +618,7 @@ x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */ if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */ { - error("out of memory!"); + pd_error(x, "out of memory!"); } x->x_bytesbuffered = 0; x->x_inp = 0; --- pd-unauthorized.orig/mp3write~.c +++ pd-unauthorized/mp3write~.c @@ -126,7 +126,7 @@ if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf)) #endif { - error("not enough memory!"); + pd_error(x, "not enough memory!"); return; } @@ -145,7 +145,7 @@ } x->x_start = 1; } - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3write~: buffers overlap!"); + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3write~: buffers overlap!"); i = MY_MP3_MALLOC_IN_SIZE - x->x_outp; @@ -184,7 +184,7 @@ if(x->x_mp3size<0) { lame_close( x->lgfp ); - error("mp3write~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); + pd_error(x, "mp3write~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size); x->x_lame = -1; } } @@ -208,11 +208,11 @@ if(err < 0) { - error("mp3write~: could not write encoded data to file (%d)", err); + pd_error(x, "mp3write~: could not write encoded data to file (%d)", err); lame_close( x->lgfp ); x->x_lame = -1; #ifdef _WIN32 - error("mp3write~: writing data"); + pd_error(x, "mp3write~: writing data"); _close(x->x_fd); #else perror("mp3write~: writing data"); @@ -225,7 +225,7 @@ x->x_byteswritten += err; outlet_float( x->x_obj.ob_outlet, x->x_byteswritten ); } - if((err > 0)&&(err != x->x_mp3size))error("mp3write~: %d bytes skipped", x->x_mp3size - err); + if((err > 0)&&(err != x->x_mp3size))pd_error(x, "mp3write~: %d bytes skipped", x->x_mp3size - err); } @@ -360,7 +360,7 @@ dll=LoadLibrary("lame_enc.dll"); if(dll==NULL) { - error("mp3write~: error loading lame_enc.dll"); + pd_error(x, "mp3write~: error loading lame_enc.dll"); closesocket(x->x_fd); x->x_fd = -1; post("mp3write~: connection closed"); @@ -418,7 +418,7 @@ { if ( mp3write_tilde_lame_init(x) < 0 ) { - error( "mp3write~ : lame initialization failed ... check parameters."); + pd_error(x, "mp3write~ : lame initialization failed ... check parameters."); return; } @@ -444,7 +444,7 @@ #endif if ( ( x->x_fd = sys_open( sfile->s_name, x->x_file_open_mode, mode) ) < 0 ) { - error( "mp3write~ : cannot open >%s<", sfile->s_name); + pd_error(x, "mp3write~ : cannot open >%s<", sfile->s_name); x->x_fd=-1; return; } @@ -615,7 +615,7 @@ x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */ if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */ { - error("mp3write~ : cannot allocate internal buffers"); + pd_error(x, "mp3write~ : cannot allocate internal buffers"); return NULL; } x->x_bytesbuffered = 0; --- pd-unauthorized.orig/probalizer.c +++ pd-unauthorized/probalizer.c @@ -512,13 +512,13 @@ x->x_probs = (t_int*) getbytes( x->x_nvalues*sizeof(t_int) ); if ( !x->x_probs ) { - error( "probalizer : could not allocate buffer" ); + pd_error(x, "probalizer : could not allocate buffer" ); return NULL; } x->x_ovalues = (t_int*) getbytes( x->x_nvalues*sizeof(t_int) ); if ( !x->x_ovalues ) { - error( "probalizer : could not allocate buffer" ); + pd_error(x, "probalizer : could not allocate buffer" ); return NULL; } for ( ei=0; eix_nvalues; ei++ ) @@ -575,14 +575,14 @@ if ( nevalues == 0 ) { - error( "probalizer : probabilities are null, sorry" ); + pd_error(x, "probalizer : probabilities are null, sorry" ); return; } candidates = ( t_int* ) getbytes( nevalues*sizeof( t_int ) ); if ( !candidates ) { - error( "probalizer : could not allocate buffer for internal computation" ); + pd_error(x, "probalizer : could not allocate buffer for internal computation" ); return; } --- pd-unauthorized.orig/samplebox~.c +++ pd-unauthorized/samplebox~.c @@ -546,7 +546,7 @@ if ( fsize <= 0 ) { - error( "samplebox~ : missing or negative creation arguments" ); + pd_error(x, "samplebox~ : missing or negative creation arguments" ); return NULL; } --- pd-unauthorized.orig/scrolllist.c +++ pd-unauthorized/scrolllist.c @@ -844,7 +844,7 @@ { if ( argv[0].a_type != A_FLOAT ) { - error( "scrolllist : wrong argument (capacity : 1)" ); + pd_error(x, "scrolllist : wrong argument (capacity : 1)" ); return NULL; } x->x_capacity = (int)argv[0].a_w.w_float; @@ -853,13 +853,13 @@ { if ( argv[1].a_type != A_FLOAT ) { - error( "scrolllist : wrong argument (width : 2)" ); + pd_error(x, "scrolllist : wrong argument (width : 2)" ); return NULL; } if ( (int)argv[1].a_w.w_float <= 0 ) { - error( "scrolllist : wrong width (%d)", (t_int)(int)argv[1].a_w.w_float ); - error( "scrolllist : usage : scrolllist " ); + pd_error(x, "scrolllist : wrong width (%d)", (t_int)(int)argv[1].a_w.w_float ); + pd_error(x, "scrolllist : usage : scrolllist " ); return NULL; } x->x_width = (int)argv[1].a_w.w_float; @@ -868,13 +868,13 @@ { if ( argv[2].a_type != A_FLOAT ) { - error( "scrolllist : wrong argument (height : 3)" ); + pd_error(x, "scrolllist : wrong argument (height : 3)" ); return NULL; } if ( (int)argv[2].a_w.w_float <= 0 ) { - error( "scrolllist : wrong height (%d)", (t_int)(int)argv[2].a_w.w_float ); - error( "scrolllist : usage : scrolllist " ); + pd_error(x, "scrolllist : wrong height (%d)", (t_int)(int)argv[2].a_w.w_float ); + pd_error(x, "scrolllist : usage : scrolllist " ); return NULL; } x->x_height = (int)argv[2].a_w.w_float; @@ -884,15 +884,15 @@ if ( argv[3].a_type != A_SYMBOL || argv[5].a_type != A_SYMBOL ) { - error( "scrolllist : wrong arguments (font : 4,6)" ); - error( "argument types : %d %d", argv[3].a_type, argv[5].a_type ); + pd_error(x, "scrolllist : wrong arguments (font : 4,6)" ); + pd_error(x, "argument types : %d %d", argv[3].a_type, argv[5].a_type ); return NULL; } if ( argv[4].a_type != A_SYMBOL && argv[4].a_type != A_FLOAT ) { - error( "scrolllist : wrong arguments (font size : 5)" ); - error( "argument types : %d", argv[4].a_type ); + pd_error(x, "scrolllist : wrong arguments (font size : 5)" ); + pd_error(x, "argument types : %d", argv[4].a_type ); return NULL; } if ( argv[4].a_type == A_SYMBOL ) @@ -914,7 +914,7 @@ { if ( argv[6-argoffset].a_type != A_SYMBOL ) { - error( "scrolllist : wrong arguments (background color : %d)", 7-argoffset ); + pd_error(x, "scrolllist : wrong arguments (background color : %d)", 7-argoffset ); return NULL; } strcpy( x->x_bgcolor, argv[6-argoffset].a_w.w_symbol->s_name ); @@ -923,7 +923,7 @@ { if ( argv[7-argoffset].a_type != A_SYMBOL ) { - error( "scrolllist : wrong arguments (foreground color : %d)", 8-argoffset ); + pd_error(x, "scrolllist : wrong arguments (foreground color : %d)", 8-argoffset ); return NULL; } strcpy( x->x_fgcolor, argv[7-argoffset].a_w.w_symbol->s_name ); @@ -932,7 +932,7 @@ { if ( argv[8-argoffset].a_type != A_SYMBOL ) { - error( "scrolllist : wrong arguments (selection color : %d)", 9-argoffset ); + pd_error(x, "scrolllist : wrong arguments (selection color : %d)", 9-argoffset ); return NULL; } strcpy( x->x_secolor, argv[8-argoffset].a_w.w_symbol->s_name ); --- pd-unauthorized.orig/sonogram~.c +++ pd-unauthorized/sonogram~.c @@ -2200,7 +2200,7 @@ if ( fsize <= 0 || ( fgraphic != 0 && fgraphic != 1 ) || ( fphaso != 0 && fphaso != 1 ) ) { - error( "sonogram~ : missing or negative creation arguments" ); + pd_error(x, "sonogram~ : missing or negative creation arguments" ); return NULL; } --- pd-unauthorized.orig/speexin~.c +++ pd-unauthorized/speexin~.c @@ -197,7 +197,7 @@ break; default : - error( "speexin~ : severe error : decoding scheme is unknown" ); + pd_error(x, "speexin~ : severe error : decoding scheme is unknown" ); break; } @@ -600,7 +600,7 @@ x->x_decchunk = (t_float*)getbytes(x->x_framesize*sizeof(t_float)); if (!x->x_decchunk) /* check allocation... */ { - error("speexin~ : cannot allocate chunk"); + pd_error(x, "speexin~ : cannot allocate chunk"); return NULL; } --- pd-unauthorized.orig/speexout~.c +++ pd-unauthorized/speexout~.c @@ -178,7 +178,7 @@ count = send(x->x_fd, x->x_outbuf, x->x_encsize+1, MSG_NOSIGNAL); if(count < 0) { - error("speexout~: could not send encoded data to the peer (%d)", count); + pd_error(x, "speexout~: could not send encoded data to the peer (%d)", count); #ifdef _WIN32 closesocket(x->x_fd); #else @@ -197,7 +197,7 @@ } if(count != x->x_encsize+1) { - error("speexout~: %d bytes skipped", x->x_encsize - count); + pd_error(x, "speexout~: %d bytes skipped", x->x_encsize - count); } } x->x_encsize = -1; @@ -276,7 +276,7 @@ break; default : - error( "speexout~ : severe error : encoding scheme is unknown" ); + pd_error(x, "speexout~ : severe error : encoding scheme is unknown" ); break; } @@ -305,14 +305,14 @@ if (x->x_fd >= 0) { - error("speexout~: already connected"); + pd_error(x, "speexout~: already connected"); return; } sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) { - error("speexout~: internal error while attempting to open socket"); + pd_error(x, "speexout~: internal error while attempting to open socket"); return; } @@ -338,7 +338,7 @@ post("speexout~: connecting to port %d", portno); if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0) { - error("speexout~: connection failed!\n"); + pd_error(x, "speexout~: connection failed!\n"); #ifdef _WIN32 closesocket(sockfd); #else @@ -422,7 +422,7 @@ x->x_outbuf = getbytes(OUT_BUFFER_SIZE); /* our mp3 stream */ if ((!x->x_inbuf)||(!x->x_outbuf)) /* check buffers... */ { - error("speexout~ : cannot allocate buffers"); + pd_error(x, "speexout~ : cannot allocate buffers"); return NULL; } x->x_bytesbuffered = 0; @@ -436,7 +436,7 @@ x->x_encchunk = (t_float*)getbytes(x->x_framesize*sizeof(t_float)); if (!x->x_encchunk) /* check allocation... */ { - error("speexout~ : cannot allocate chunk"); + pd_error(x, "speexout~ : cannot allocate chunk"); return NULL; } return(x);