aboutsummaryrefslogtreecommitdiff
path: root/mp3live~/mp3fileout~.c
diff options
context:
space:
mode:
authorcarmen rocco <ix9@users.sourceforge.net>2004-05-22 14:04:17 +0000
committercarmen rocco <ix9@users.sourceforge.net>2004-05-22 14:04:17 +0000
commitc08df8dda4424f84dbf34df69c71634d408eba7c (patch)
treee413b56e725312fd3dd03965ee5b0ce21b4f6dd5 /mp3live~/mp3fileout~.c
parent43fe56f639ea3a24954859420b5b329392168cb3 (diff)
making mp3*~ work on windows
svn path=/trunk/externals/unauthorized/; revision=1755
Diffstat (limited to 'mp3live~/mp3fileout~.c')
-rw-r--r--mp3live~/mp3fileout~.c18
1 files changed, 9 insertions, 9 deletions
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 <unistd.h>
#include <fcntl.h>
#include <stdio.h>
-#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 <winsock.h>
+#include <io.h>
+#include <fcntl.h>
+#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 );