|
-
Apr 15th, 2000, 11:47 PM
#1
Thread Starter
Frenzied Member
If anyone knows how to play a MIDI file during a game without stopping the game, please do let me know. Thanks.
-
Apr 16th, 2000, 05:01 AM
#2
Hyperactive Member
yeah, use DirectMusic, assuming your game is DirectX.
Otherwise, can't you use MciExecute or something?
buzzwords are the language of fools
-
Apr 16th, 2000, 05:31 AM
#3
Thread Starter
Frenzied Member
Using MCI Sendstring but no result
Well, it isn't DirectX (which I still don't know how to use). I am using this one that I found in a FAQ on another website:
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim ret As Long
(and in the sub)
ret = mciSendString("open c:\midi\myfile.mid type sequencer alias myfile", 0&, 0, 0)
ret = mciSendString("play myfile wait", 0&, 0, 0)
ret = mciSendString("close myfile", 0&, 0, 0)
The problem is with the "WAIT" command the Midi starts when the game starts and then control is not returned to the game until the MIDI finishes. When the "WAIT" is taken out, it simply doesn't play the MIDI. Any thoughts?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|