I am messing around with the FX with streams and have come across a problem. I have this code spread out through multiple functions but I will post it to how I am using it in my program.
If FSOUND_Init(44100, 32, FSOUND_INIT_ENABLEOUTPUTFX) = 0 Then
MsgBox "An error occured initializing device" & vbCrLf & FSOUND_GetErrorString(FSOUND_GetError)
PAStream = FSOUND_Stream_Open(sFilename, FSOUND_NORMAL, 0, 0)
If PAStream = 0 Then
MsgBox "There was an error playing song!", vbCritical, "Error Playing"
If PAStream <> 0 Then
Dim lngTemp As Long
lngTemp = FSOUND_DSP_Create(PAStream, 0, 0)
FSOUND_DSP_SetActive lngTemp, 1
PAChannel = FSOUND_Stream_PlayEx(FSOUND_FREE, PAStream, lngTemp, 0)
Now I want to enable flanger after playing the song.
If PAChannel <> 0 Then
FSOUND_SetPaused PAChannel, True
lngTemp = FSOUND_FX_Enable(PAChannel, FSOUND_FX_FLANGER)
FSOUND_SetPaused PAChannel, False
After doing all of that I get music and spectrum analysis and all works great but it doesn’t return a fxid for the flanger. All it returns is a -1.
- Sentax asked 15 years ago
[quote:1thz0lps]have a read of the ‘FX’ tutorial. The first thing i can see is you are trying to do fx on a software channel, you have to specify FSOUND_HW2D and FSOUND_ENABLEFX on that stream when you open it. [/quote:1thz0lps]
In the documentation is states that I should not use the FSOUND_HW2D or FSOUND_HW3D so I can use effects on a stream in software mode.
Why is that?
I guess I am just all over confused on what is happening or how I am suppose to be able to make effects as in Echo, Flanger, Reverb with an Mp3 stream using the code I posted in my initial question.
Brett I checked out the link you supplied in your last post and that is where I read about not using FSOUND_HW2D or FSOUND_HW3D in initializing FMOD.
Does that make sense?
Ok well the thing is that I do need to do this globally. I still need to have my DSP working while I have effects enabled.
I have gotten the FX to work just fine but the DSP doesn’t work. I read about enabling the GLOBAL spectrum for DSP and FX but couldn’t follow along again (Surprise! 😆 )
Any hinters on making my FX work with DSP?
Sorry if this is getting long and I am not understanding well
Please login first to submit.