Sound trouble solved

The SDL_INIT_AUDIO fixed it, then some other minor details. I’ve ported
my bomberman game to SDL now. There was some trouble last night with the
socket library under win32, it would crap out when I tried to create a
socket.
udpsocket=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP);
if(udpsocket==-1)
{
perror(“socket()”);
exit(1);
}
This would fail, ie the socket function wouldn’t give me a socket.

Aside from that the game is ported as it was running under Xlib. Is there
any equivalent to the pause() function under win32? Meaning wait until
the timer interrupt occurs, but keep the cpu off the bus so I’m not wasting
cycles?

Thanks–
Dave

The SDL_INIT_AUDIO fixed it, then some other minor details. I’ve ported
my bomberman game to SDL now. There was some trouble last night with the
socket library under win32, it would crap out when I tried to create a
socket.
udpsocket=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP);
if(udpsocket==-1)
{
perror(“socket()”);
exit(1);
}
This would fail, ie the socket function wouldn’t give me a socket.

Take a look at the netlib example library in the SDL demos archive.

Aside from that the game is ported as it was running under Xlib. Is there
any equivalent to the pause() function under win32? Meaning wait until
the timer interrupt occurs, but keep the cpu off the bus so I’m not wasting
cycles?

Nope, unfortunately not.
Usually what I do is do SDL_WaitEvent() or combine SDL_PollEvent() with
SDL_Delay() based on the amount of time left in the current frame.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec