Mirage Source
Audio Trouble - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Audio Trouble (/showthread.php?tid=635)



Audio Trouble - DarkX - 11-01-2007

I have a question, as you know I have been modifing a copy of MSE for sometime now, but I haven't done anything involving audio but the sound doesn't work on my engine. It has been that way since I started programming it, but I thought that it might be something with my computer. But I got yet another new one and there is no change, could someone help me with this little problem.

Thanks in advance,
Korrey D.


- William - 11-01-2007

I believe it works in MSE, so I suggest you compare your source with a unedited MSE, shouldn't take too long.


- DarkX - 24-01-2007

I tried my modified one and a scrap model, and the audio doesn't work. Could someone point out to me where the jist of the code to play audio is?


- William - 24-01-2007

Code:
Public Sub PlayMidi(Song As String)
'****************************************************************
'* WHEN        WHO        WHAT
'* ----        ---        ----
'* 07/12/2005  Shannara   Added music constant.
'****************************************************************

Dim i As Long
    
    i = mciSendString("close all", 0, 0, 0)
    i = mciSendString("open " & App.Path & MUSIC_PATH & Song & " type sequencer alias background", 0, 0, 0)
    i = mciSendString("play background notify", 0, 0, frmMirage.hWnd)
End Sub

Public Sub StopMidi()
Dim i As Long
  
    i = mciSendString("close all", 0, 0, 0)
End Sub

Public Sub PlaySound(Sound As String)
'****************************************************************
'* WHEN        WHO        WHAT
'* ----        ---        ----
'* 07/12/2005  Shannara   Added sound constant.
'****************************************************************

    Call sndPlaySound(App.Path & SOUND_PATH & Sound, SND_ASYNC Or SND_NOSTOP)
End Sub



- DarkX - 24-01-2007

That's different than mine.


- William - 24-01-2007

That is a unedited MSE1.


- Aydan - 25-01-2007

I have a problem too. Mines exactly the same yet it doesnt work. somethings wrong lol =P