0
0

Following code causes inadmissible error, and VB flies:( That not so?

‘ This project needs a command button, named ‘Command1’
Option Explicit
Dim stream&, channel&, EQ&
Private Sub Form_Load()
Call FSOUND_Init(44100, 32, FSOUND_NORMAL)
End Sub
Private Sub Form_Unload(Cancel As Integer)
FSOUND_Close
End Sub
Private Sub Command1_Click()
stream = FSOUND_Stream_OpenFile(“MP3_FILE”, FSOUND_NORMAL Or FSOUND_MPEGACCURATE Or FSOUND_ENABLEFX, 0)
FSOUND_DSP_SetActive FSOUND_DSP_GetFFTUnit, True
channel = FSOUND_Stream_PlayEx(FSOUND_FREE, stream, vbEmpty, True)
EQ = FSOUND_FX_Enable(channel, FSOUND_FX_PARAMEQ)
Call FSOUND_FX_SetParamEQ(EQ, 80, 18, 0)
Call FSOUND_SetPaused(channel, False)
End Sub

  • You must to post comments
0
0

Hiyas, XO. Ok let me make a few suggestions, First and formost. You really should change your command button to check to see if your stream variable is already open ie, non 0, if so close the stream, you should also check this on your unload function as well.

Next In order to initalize FMOD to use FSOUND_FX_PARAMEQ, you must initalize FMOD with it, via FSOUND_ENABLEFX. For example change the line that reads…
[code:1adnkqug]
Call FSOUND_Init(44100, 32, FSOUND_NORMAL)
[/code:1adnkqug]

to something like
[code:1adnkqug]
Call FSOUND_Init( 44100, 32, FSOUND_NORMAL or FSOUND_ENABLEFX )
[/code:1adnkqug]

I can’t remember if you need a FSOUND_HW3D or was it FSOUND_HW2D, or perhaps i’am thinking of something else.

Hope this helps.

++Cire.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.