0
0

I get an FMOD_ERR_DSP_RUNNING from PlaySound when I create the sound with FMOD_SOFTWARE instead of FMOD_HARDWARE – why is that and how do I fix it?!
(I want to use the build in DSP effects so I need FMOD_SOFTWARE)

Below is PureBasic code that gives the area. (http://www.purebasic.com)

[code:jkny9gi8]#FMOD_HARDWARE = $00000020

FMOD_SOFTWARE = $00000040

FMOD_INIT_NORMAL = $00000000

FMOD_CHANNEL_FREE = -1

Structure FMOD_DSP_DESCRIPTION
name.b[32]
version.l
channels.l
create.l
release.l
reset.l
read_.l
setposition.l
numparameters.l
paramdesc.l
setparameter.l
getparameter.l
config.l
configwidth.l
configheight.l
userdata.l
EndStructure

Global system, sample

Procedure DSPCallback(a, b, c, d, e, f)
Static delay
If delay = 0
result = CallFunction(0, "FMOD_System_PlaySound", system, #FMOD_CHANNEL_FREE, sample, #False, @channel)

;
;Error: result = FMOD_ERR_DSP_RUNNING (17)
;-----------------------------------------
;


delay = 10

EndIf
delay – 1
EndProcedure

OpenLibrary(0, "fmodex.dll")
CallFunction(0, "FMOD_System_Create", @system)
CallFunction(0, "FMOD_System_Init", system, 32, #FMOD_INIT_NORMAL, 0)

CallFunction(0, "FMOD_System_CreateSound", system, "lt.wav", #FMOD_SOFTWARE, 0, @sample)

;
;If I change #FMOD_SOFTWARE to #FMOD_HARDWARE I do not get the error
;——————————————————————-
;

description.FMOD_DSP_DESCRIPTION
description\read_ = @DSPCallback()
CallFunction(0, "FMOD_System_CreateDSP", system, description, @dsp)
CallFunction(0, "FMOD_System_AddDSP", system, dsp)

Delay(2000)[/code:jkny9gi8]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.