[Icecast-dev] timing_sleep malfunctioning under MinGW

Alan Newberger alann
Fri Jun 25 11:41:26 PDT 2004


Hi,
I have successfully gotten the libshout-2.0 release to compile under
gcc/MingGW ('gcc -mno-cygwin', version 'gcc (GCC) 3.3.1 (cygming
special)'), after applying Leigh Smith's patches as posted on this list
(http://www.xiph.org/archives/icecast-dev/0660.html). I have then
generated a dll and wrapped it in JNI using the stubs from libshout-java
(http://benow.ca/index?page=project&project=libshout-java). So, I have
libshout basically working through Java on Windows XP.

I think everything is working ok, except shout_sync. This call returns
immediately under the compilation setup above, instead of actually
sleeping, screwing up the audio streams. This occurs in exactly the same
way when I compile the ezstream utility off of the libraries as when I'm
running libshout through Java, so I don't think it's an artifact of the
JNI process.

Looking at timing_sleep, the only relevant call there is select(), so
I'm guessing the problem is in the invocation there, but I can't figure
out what would fix it -- I've been programming Java too long, I'm just
glad I made it this far :)

I modified the JNI wrappers to expose shout_delay and have been
handling sleeping on my own in Java, and everything seems to work
perfectly. So this isn't a debilitating issue for me, but I'm hoping
someone on the list will recognize what the fix would be and can get
shout_sync working at some point under MinGW. Thanks!

-alan

PS. under regular cygwin this problem doesn't occur; I need to go ming
for JNI.



More information about the Icecast-dev mailing list