0
0

Hi,

I wrote a little Player based on your great fmod. To this Point all works great and easy. But now I have some real Problems on Getting DXFX work. 😥

This is my code so far:
[code:2xgs318r]
FSOUND_SetOutput(2);

if (!FSOUND_Init(44100, 32, FSOUND_INIT_ENABLEOUTPUTFX))
{
MessageBox("Fehler beim Initialisieren der FMOD Sound Engine!",
"fmod Fehler", MB_ICONERROR);
return false;
}

FSOUND_Stream_SetBufferSize(pO->iStreamPufferGroesse);

m_FS_FileStream = FSOUND_Stream_OpenFile(filename,
FSOUND_HW2D | FSOUND_ENABLEFX, 0);

if (m_FS_FileStream==NULL)
{
MessageBox("Konnte die gewünschte Datei nicht öffnen!", "Dateifehler", MB_ICONERROR);
return;
}

m_FS_DSPUnit = FSOUND_DSP_Create(NULL, 0, 0);

FSOUND_Stream_SetEndCallback(m_FS_FileStream, ISP_EndCallback, (DWORD)this);

m_iPlayChannel = FSOUND_Stream_PlayEx(0, m_FS_FileStream, m_FS_DSPUnit, true);
if (m_iPlayChannel!=-1)
{
FSOUND_SetVolume(0, m_SliderVolume.GetPos());
FSOUND_SetPan(0, m_SliderPan.GetPos());
m_bIsPlaying = true;

int iFX = FSOUND_FX_Enable(0, FSOUND_FX_ECHO);
DWORD dwError = FSOUND_GetError();
if (iFX!=-1)
{
    FSOUND_FX_SetEcho(iFX, 50, 0, 333, 333, false);
}

FSOUND_SetPaused(0, false);

}
[/code:2xgs318r]

and there are more than 1 Problem. FSOUND_Init won’t work with the FSOUND_INIT_ENABLEOUTPUTFX Flag. To get the Code work I have to replace it with NULL.

But then FSOUND_Stream_PlayEx gets an Error. It returns -1. So I tried to leve the FSOUND_Stream_OpenFile Flags to FSOUND_NORMAL. With the modified code, he plays again but gets an Error on FSOUND_FX_Enable.

I don’t understand why Play didn’t work anymore if I use the FSOUND_HW2D | FSOUND_ENABLEFX flags. I was really proud If someone can give me a solution or a explain for my prbolem.

Thanks
George

Excuse my bad english but I’m from Germany and I had my last English Lession 1 year ago 😉

  • You must to post comments
0
0

Yeah it works!! I found my mistake. I thought FSOUND_SetBufferSize(100) was to make the Buffer Bigger than default. I don’t know that the Buffer must have EXACT this size. I’ve used one with 1000.

  • You must to post comments
0
0

Hey, ich habe das selbe Probleme?
Kannst du mir genauer sagen wie du das gelöst hast?

mfg
chris

  • You must to post comments
0
0

Ich habs jetzt hingekriegt, nur bekomm ich jetzt die VU-aussteuerung nicht mehr ???? was kann ich dagegen tun?

  • You must to post comments
0
0

But now the GetCurrentLevels() function doesnt work?
Can someone help me to solve this Problem?

  • You must to post comments
0
0

THX

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.