VB usage of winm.lib causes ST environment to go unstable?

I was still having random events that sent my Starship Tycoon loopy for me… :blush:

I finally found a culprit on my comp…

A lil’ talking clock app I wrote that annouces time using wavs from my kids, nieces & nephews… ( :wink: sentimental…)

Main Statement…
“Declare Function sndPlaysound Lib “winmm” Alias “sndPlaySoundA” _
(ByVal soundfilename As String, ByVal Flags As Long) As Long”

I’m not listing the entire module…(it’s easy to find in a websearch anyway…)…besides, that function is almost all there is to the wrapper’s usage anyway.

I’m using it in synch mode to play wav snippetts to make up complete times & play musical alerts.

:confused: anyone got any ideas? :confused:


I use winmm within starship tycoon (using C++), for some timing related code. Maybe it conflicts?

I ran some tests and yeah…
Multiple simultaneous uses of that LIB from different processes are …at best…un-reliable. IT’s more like a “legal” hack that MS doesn’t/can’t get rid of. If you’re timing it with that… then that explains the moving starfield going in jerks when it’s about to crash.

What about using an API like tick count that uses system time for your clock? The wavs normally start and retart so any instablilties work themselves out for sounds… Given that it was never intended for serious reliability, relying on it for timing could cause a heap of troubles.

:question: Could that be affecting your program when run thru the yahoo wrapper? (I don’t know enough about that wrapper to more than ask.)