0
0

Hi all.

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.

First:

[code:1dwgkht9]

FSOUND_SetDriver (0)
FSOUND_SetBufferSize (100)

If FSOUND_Init(44100, 32, FSOUND_INIT_ENABLEOUTPUTFX) = 0 Then
‘Error
MsgBox "An error occured initializing device" & vbCrLf & FSOUND_GetErrorString(FSOUND_GetError)
End
End If
[/code:1dwgkht9]

Second:

[code:1dwgkht9]
PAStream = FSOUND_Stream_Open(sFilename, FSOUND_NORMAL, 0, 0)

If PAStream = 0 Then
MsgBox "There was an error playing song!", vbCritical, "Error Playing"
Exit Sub
End If

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)
End If
[/code:1dwgkht9]

Last:
Now I want to enable flanger after playing the song.

[code:1dwgkht9]
If PAChannel <> 0 Then
FSOUND_SetPaused PAChannel, True
lngTemp = FSOUND_FX_Enable(PAChannel, FSOUND_FX_FLANGER)
FSOUND_SetPaused PAChannel, False
End If
[/code:1dwgkht9]

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.

Any ideas?

  • You must to post comments
0
0

Just giving this a little BUMP to see if I can attract someones attention.

๐Ÿ˜‰

  • You must to post comments
0
0

Ok I will check it out. Never thought to check out the tutorials ๐Ÿ˜†

Thanks again.

  • You must to post comments
0
0

[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?

  • You must to post comments
0
0

Hmmmm…

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?

  • You must to post comments
0
0

Ok I was just reading it wrong.

Even though I have been messing around with FMOD for almost a year now I can still get confused.

Thanks

  • You must to post comments
0
0

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

  • You must to post comments
0
0

I think this is losing the attention I want again.

Sorry but I have to BUMP

  • You must to post comments
0
0

I’m sorry you had to repeat yourself.

I will look at it more and mess around with it.

Sometimes I need to look into things a few times before it clicks. So throw me into the special ed group.. ๐Ÿ˜‰

:roll:

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.