From c08df8dda4424f84dbf34df69c71634d408eba7c Mon Sep 17 00:00:00 2001 From: carmen rocco Date: Sat, 22 May 2004 14:04:17 +0000 Subject: making mp3*~ work on windows svn path=/trunk/externals/unauthorized/; revision=1755 --- mp3live~/mp3fileout~.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mp3live~/mp3fileout~.c') diff --git a/mp3live~/mp3fileout~.c b/mp3live~/mp3fileout~.c index 3782c7e..0559a75 100644 --- a/mp3live~/mp3fileout~.c +++ b/mp3live~/mp3fileout~.c @@ -47,18 +47,16 @@ #include #include #include -#include "mpg123.h" /* mpg123 decoding library from lame 3.92 */ -#include "mpglib.h" /* mpglib decoding library from lame 3.92 */ -#include "interface.h" /* mpglib decoding library from lame 3.92 */ #define SOCKET_ERROR -1 #else #include +#include +#include +#define MSG_NOSIGNAL 0 #endif - -#ifdef NT -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4305 ) -#endif +#include "mpg123.h" /* mpg123 decoding library from lame 3.92 */ +#include "mpglib.h" /* mpglib decoding library from lame 3.92 */ +#include "interface.h" /* mpglib decoding library from lame 3.92 */ #define INPUT_BUFFER_SIZE 32768 #define OUTPUT_BUFFER_SIZE 32768 @@ -90,8 +88,9 @@ void mp3fileout_closesocket(int fd) #endif #ifdef NT closesocket(fd); -#endif +#else sys_rmpollfn(fd); +#endif } /* ------------------------ mp3fileout~ ----------------------------- */ @@ -390,6 +389,7 @@ static void mp3fileout_open(t_mp3fileout *x, t_symbol *filename) x->x_outframes = 0; outlet_float( x->x_frames, x->x_outframes ); } + if ( ( x->x_fd = open( filename->s_name, O_RDONLY ) ) < 0 ) { post( "mp3fileout~ : could not open file : %s", filename->s_name ); -- cgit v1.2.1