Threads.

Unless the Source engine has some system-agnostic thread interface (the
developers' wiki returns zero results... must suck doing server
threading for both POSIX (Unix) and Windows separately), just read this:

http://msdn2.microsoft.com/en-us/library/ms682516.aspx

The thread function should, while making sure the music is playing,
periodically check some sort of global variable and return when it
becomes non-zero. CreateThread right before you load; when loading is
done, set the global variable to 1 and do a WaitForSingleObject followed
by a CloseHandle. I don't think you need to CriticalSection the global
variable setting since only one thread will ever modify it (the one
responsible for the loading).

Oh, and should you ever wonder: what POSIX threads call "mutex" is a
"critical section" on Windows. A "mutex" is used for interprocess (and
not interthread like on POSIX) communications on Windows.

~~ Ondra

On 12.08.07 21:44 Uhr, Nick wrote:
FMOD you too.  I am lost as to what exactly you are saying. How do I
start music playing when the map change occurs and a new map begins
loading?

On 8/11/07, Jeffrey botman Broome <[EMAIL PROTECTED]> wrote:

Nick wrote:

I would also like to know how this is done.

FMOD?  Start up a thread, let it run while loading a map.  Fade to
silence when the map starts running.

--
Jeffrey "botman" Broome


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to