0
0

Hi folks,

I m trying to use DSP stuff within my delphi application.

Unfortunately there is no sample code showing this special part.

My goal is to use the FMOD_DSP_TYPE_PITCHSHIFT DSP to slow down a playing stream without changing the pitch.

This is the relevant source so far …

[code:2f1doj2n]
procedure TForm1.ButtonSpeedUp(Sender: TObject);
var dsp_pitch : Pointer;
begin
FMOD_Channel_SetPaused(channel, true);
FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PITCHSHIFT, dsp_pitch);
FMOD_DSP_SetParameter(dsp_pitch, 0, 2.0);
FMOD_Channel_AddDSP(channel, dsp_pitch);
FMOD_Channel_SetPaused(channel, false);
end;
[/code:2f1doj2n]

Thanks for your(!) help!! 😉

  • You must to post comments
0
0

Well ..

I used the following code to start the sound:

[code:3sxvzqxb]
// INIT
FMOD_System_Create(system);
FMOD_System_GetVersion(system, version);
FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NIL);
// PLAY SOUND
FMOD_Channel_Stop(channel);
FMOD_System_CreateStream(system, ‘testsong.mp3’, FMOD_HARDWARE OR FMOD_LOOP_OFF, 0, sound);
FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);
FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, false, channel);

[/code:3sxvzqxb]

I changed FMOD_HARDWARE to FMOD_SOFTWARE and IT WORKS!

But .. setting

[code:3sxvzqxb]
FMOD_DSP_SetParameter(dsp_pitch, 0, 2.0);
[/code:3sxvzqxb]
does only increase the pitch .. 😥

My goal is to slow down (or speed up) the playing speed while keeping the pitch.

Any help?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.