0
0

If I use this code in VB to play a netstream, it works:
[code:1if0bhuh] Dim result As FMOD_RESULT
‘ Dim slen
‘ sStop
result = FMOD_System_CreateStream(system, sFile, FMOD_SOFTWARE, sound)
result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, channel)

‘ result = FMOD_Channel_GetFrequency(channel, deffreq)
‘ frmSpeceff.newfreq deffreq
‘ result = FMOD_Sound_GetLength(sound, slen, FMOD_TIMEUNIT_MS)
‘ frmMain.sldPos.max = Int(slen)
‘ frmMain.sldPos.Enabled = True[/code:1if0bhuh]
but if I use this, my programm collapses:
[code:1if0bhuh] Dim result As FMOD_RESULT
Dim slen
sStop
result = FMOD_System_CreateStream(system, sFile, FMOD_SOFTWARE, sound)
result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, channel)

result = FMOD_Channel_GetFrequency(channel, deffreq)
frmSpeceff.newfreq deffreq
result = FMOD_Sound_GetLength(sound, slen, FMOD_TIMEUNIT_MS)
frmMain.sldPos.max = Int(slen)
frmMain.sldPos.Enabled = True[/code:1if0bhuh]

I use that code to initialisize the FMOD:
[code:1if0bhuh] Dim result As FMOD_RESULT
‘ Create a System object and initialize.
result = FMOD_System_Create(system)
ERRCHECK (result)

result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0)
ERRCHECK (result)

result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_LOWPASS, dsplowpass)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_HIGHPASS, dsphighpass)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_ECHO, dspecho)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_FLANGE, dspflange)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_DISTORTION, dspdistortion)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_CHORUS, dspchorus)
ERRCHECK (result)
result = FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PARAMEQ, dspparameq)
ERRCHECK (result)[/code:1if0bhuh]

Can anybody help?

Sorry for writing so much rubbish into the forum but I am a fulltime-noob

ToMiNaToR

  • You must to post comments
0
0

Problem solved
ToMinaToR

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.