Alan Newberger
2004-Aug-06  14:57 UTC
[Icecast-dev] timing_sleep malfunctioning under MinGW
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.
Alan Newberger
2004-Aug-06  14:57 UTC
[Icecast-dev] timing_sleep malfunctioning under MinGW
Of course, only after posting to the list do I peek in the subversion repository and notice that some Win32-centric patches to timing have already been made. I'll try them out, sorry for the spam... -alan Alan Newberger wrote:> 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. > > _______________________________________________ > Icecast-dev mailing list > Icecast-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/icecast-dev