0
0

Hello.

I’ve still problem with the EQ. I got an other topic of this forum, but it was useless.

If have somebody a working C/C++ source, from the EQ, please send to me to the jonnyuser@freemail.hu address.

My source is the following :

/* Initialization of the FMOD */
if (FSOUND_GetVersion() < FMOD_VERSION) {
Error.SendString (“Sound system initialization error !”) ;
return (false) ;
}
if (FSOUND_SetOutput (FSOUND_OUTPUT_DSOUND) == FALSE) {
Error.SendString (FMOD_ErrorString (FSOUND_GetError ())) ;
return (false) ;
}

if (FSOUND_SetDriver (0) == FALSE) {
Error.SendString (FMOD_ErrorString (FSOUND_GetError ())) ;
return (false) ;
}

if (FSOUND_Init (44100, 32, FSOUND_INIT_ENABLEOUTPUTFX) == FALSE) {
Error.SendString (FMOD_ErrorString (FSOUND_GetError ())) ;
return (false) ;
}

Music = FSOUND_Stream_OpenFile ((char *)MusicFileName, FSOUND_LOOP_OFF | FSOUND_16BITS | FSOUND_STEREO, 0) ;
if (Music == NULL) {
Error.SendString (FMOD_ErrorString (FSOUND_GetError ())) ;
return (false) ;
}

// Start = false at this point to pause the playing
MusicChannel = FSOUND_Stream_PlayEx (FSOUND_FREE, Music, NULL, (Start == 0) ? -1 : 0) ;
if (MusicChannel == -1)
Error.SendString (FMOD_ErrorString (FSOUND_GetError ())) ;

FSOUND_SetPan (MusicChannel, FSOUND_STEREOPAN) ;
FSOUND_SetReserved (MusicChannel, FALSE) ;

int FXID = FSOUND_FX_Enable (MusicChannel, FX) ;
FSOUND_FX_SetParamEQ (FXID, Center, Bandwidth, Gain) ;
FSOUND_SetPaused (MusicChannel, FALSE)

Thats it.
Before it freeze it throws this message : Error creating hardware sound buffer

I don’t know what is bad, and I haven’t any example for the effects on streams and the documentation doesn’t contains enough information.

Please somebody help to me, because I need the EQ as soon as possible.

Jonny

  • You must to post comments
0
0

Hey Jonny,

Try this for your FSOUND_Stream_OpenFile call:

Music = FSOUND_Stream_OpenFile ((char *)MusicFileName, FSOUND_HW2D | FSOUND_ENABLEFX, 0);

and this for your FSOUND_FX_Enable call:

int FXID = FSOUND_FX_Enable (MusicChannel, FSOUND_FX_PARAMEQ) ;

Mike

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.