0
0

Hi everybody,

I’m doing some tests with the DSP_PITCHSHIFT (I use C interface), but when I add this dsp to a channel, it results a sound saturation.
I hope my explanation is clear.

You can try this simple code to reproduce my problem :

[code:1xl2er4w]

include <iostream>

include "FMODEX/fmod.h"

using namespace std;

int main()
{
char charac;

FMOD_SYSTEM  *sys; 
FMOD_System_Create(&amp;sys); 
FMOD_System_Init(sys, 4, FMOD_INIT_NORMAL, NULL); 
FMOD_SOUND   *sound; 
FMOD_CHANNEL *channel; 
FMOD_System_CreateStream(sys, &quot;test.wav&quot;, FMOD_HARDWARE | FMOD_LOOP_NORMAL | FMOD_2D, 0, &amp;sound); 

//play file 
FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, sound, 0, &amp;channel); 


//dsp pitchshift create 
FMOD_DSP *dsp_pitch; 
FMOD_System_CreateDSPByType(sys, FMOD_DSP_TYPE_PITCHSHIFT, &amp;dsp_pitch); 
FMOD_DSP_SetParameter(dsp_pitch, FMOD_DSP_PITCHSHIFT_PITCH, 1); 
FMOD_DSP_SetParameter(dsp_pitch, FMOD_DSP_PITCHSHIFT_FFTSIZE, 4096); 
FMOD_Channel_AddDSP(channel, dsp_pitch, 0); 

cout&lt;&lt;&quot;enter a character to stop program&quot;&lt;&lt;endl; 
cin&gt;&gt;charac; 

FMOD_System_Release(sys); 

return 0; 

}

[/code:1xl2er4w]

In this program, the DSP_PITCHSHIFT_PITCH parameter is 1 (default value). The file should be sound like the original but it’s not the case. The sound is saturate and I don’t understand why !?
This problem appears on Linux & Windows.
Could you help me ?

Thank you very much.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.