0
0

Sorry for my english !! (vb user)
——————–
The massage was shown ” FMOD error! (33) An invalid parameter was passed to this function “

   -  Public Declare in other module like this  :
          Public system As Long
          Public sound As Long
          Public result As FMOD_RESULT
          -------------------------------------

When form_load I use this code to create system & Initialize :

     dim result as FMOD_RESULT
         result = FMOD_System_Create(system)
         ERRCHECK (result)
         result = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, 0)
         ERRCHECK (result)

Program can run correctly but When I use common dialog to open sound files(create sound) an error was appear an the editor(vb) was automatic shutdown

Private Sub Opn_Snd_Click()
On Error GoTo error_event
With OpnSnd
.CancelError = True
.DialogTitle = “Open The Whistle Sound”
.Filter = “Wave Files (.wav)|.wav|MP3 Files (.mp3)|.mp3|All Files (.)|.
.flags = cdlOFNFileMustExist
.ShowOpen
End With
result = FMOD_System_CreateSound(system, OpnSnd.filename, FMOD_SOFTWARE, sound)
ERRCHECK (result) ‘<<<< error shown here
result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, channel)
ERRCHECK (result)

error_event:

End Sub

(I notice that first time I only create system “with no system_init” the error (33) was shown but no editer shutdown

after that i decode by create_system and init_system and open sound files by common dialog the sound can open and play correctly

summary
create_system —> init_sound —> create_sound
= error and vb editor shutdown (so i can’t decode)

 create_system ---&gt; create_sound ----&gt; error (editor not shutdown but program stop)

(then decode) create_system —> init_sound —> create_sound —> playsound (correctly)

   sorry again for my English. Thank's for help
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.