0
0

[size=150:287ofg5g](Freeze when stopping stream with FX enabled)[/size:287ofg5g]

I use VB6, Windows XP, SB Live!
All the code and pointer handles are in class module.

fmod init:

[code:287ofg5g]
FSOUND_SetOutput FSOUND_OUTPUT_DSOUND
FSOUND_SetMixer FSOUND_MIXER_QUALITY_FPU
FSOUND_SetBufferSize 200
FSOUND_Stream_SetBufferSize 400

device_inited = FSOUND_Init(device_freq, device_channels, 1 Or 2 Or 4)

FSOUND_SetSpeakerMode FSOUND_SPEAKERMODE_STEREO
[/code:287ofg5g]

Everything runs smooth.

When I enable FX like this:
[code:287ofg5g]
FSOUND_SetPaused FSOUND_SYSTEMCHANNEL, True
ReDim eq_handle(eq_handle_count) As Long

For I = 1 To eq_handle_count
eq_handle(I) = FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL, FSOUND_FX_PARAMEQ)
Next I

FSOUND_SetPaused FSOUND_SYSTEMCHANNEL, False

eq_inited = eq_handle(1) > 0
[/code:287ofg5g]

Yeah, the equaliser i wrote runs perfect too.
But when i try to stop the file:

[code:287ofg5g]
Do Until FSOUND_Stream_GetOpenState(.handle) = 0
DoEvents
Loop

FSOUND_Stream_Stop .handle ‘here is the freezing
FSOUND_Stream_Close .handle
[/code:287ofg5g]

I got 100% CPU usage, i can hardly move my mouse, need to wait 2 minuts for task manager to launch. WHen i simply ommit initializing FX
everything runs perfect, i can stop files hundreds of times.
When it’s on, almost every time when i stop the stream, i got above symptoms.
I tried changing everything, scanned the whole forum but didn’t find the answer.

Can anbyody help?

  • You must to post comments
0
0

OK, sorry, I forgot to add open file and play file:

OPEN FILE:
[code:31h1k2ej]
.handle = SOUND_Stream_Open(file_path, FSOUND_MPEGACCURATE, 0, 0)
[/code:31h1k2ej]

PLAY FILE:
[code:31h1k2ej]
.channel = FSOUND_Stream_PlayEx(FSOUND_FREE, media(current_media).handle, 0, False)
[/code:31h1k2ej]

Once again, any suggestions?

  • You must to post comments
0
0

I guess no one has figured out a fix for this? Sadly I had to switch to bass.dll cause I just couldn’t fix the problem.. I’d be more then willing to switch back if the problem was fixed.. :(

  • You must to post comments
0
0

Brett, You want me to do some tests? OK. I got 3 computers at home.
I’ve tested them with your example:

My second PC:
Barton 2500+
ASUS A7N8X
WinXP
NVIDIA nForce(TM) Audio Codec Interface

WORKS OK!

My third PC:
(laptop)
PIII 1000
Fujitsu Siemens MOBO
Intel AC’97 Audio – SigmaTel
Win2000

WORKS OK!

My first PC:
P4 1800
ASUS P4S533-E
WinXP
SB Live!

CRASHES/SLOWS DOWN!!!

More to come.

  • You must to post comments
0
0

sorry for the delay

[code:3w322kp4]

‘ IN MODULE
Global Const c_SBLive = "SB Live"

‘ IN INIT FMOD SUB:

‘ INIT OUTPUT AND DEVICES
FSOUND_SetOutput FSOUND_OUTPUT_WINMM
If FSOUND_GetNumDrivers > 0 Then
ReDim devices_winmm(FSOUND_GetNumDrivers – 1)
For I = 0 To FSOUND_GetNumDrivers – 1
devices_winmm(I) = GetStringFromPointer(FSOUND_GetDriverName(I))
cs = Left(LCase(devices_winmm(I)), Len(c_SBLive))
If cs = LCase(c_SBLive) Then sb_live = True
Next I
End If
FSOUND_SetOutput FSOUND_OUTPUT_DSOUND
If FSOUND_GetNumDrivers > 0 Then
ReDim devices_direct(FSOUND_GetNumDrivers – 1)
For I = 0 To FSOUND_GetNumDrivers – 1
devices_direct(I) = GetStringFromPointer(FSOUND_GetDriverName(I))
Next I
End If[/code:3w322kp4]

  • You must to post comments
0
0

anyone? is it so hard problem? i say PLEASE to every fmod-god. Brett? Andrew? Can U help me ? This issue is stopping my progress. Please. ANY feedback?

  • You must to post comments
0
0

SOMEBODY FIX THE FREEZE PROBLEM WITH FX AND STOP COMMAND UNDER VB ?????

HELLLP ME !

  • You must to post comments
0
0

Calling FSOUND_SetBufferSize(500) doesnt work. The same effect when the 500 ms buffer comes out after pause. I have also 3 pcs at home:

The one I use:
Pentium 4 1700 MHZ Willamette core
Microstar i850 pro5
SB Live! 1024 player 5.1
Win2000 SP 4

not working.

Second:
Pentium III 450 MHZ
MB BrillianX series I440BX
Manli CME8738
Win XP

yes, it is also EATING THE CPU TO 100%!!!!!!
But, prevously i had SB 16 PNP card in this computer…. and, no problems with it.

And third:
AMD am-386DX40 without coprocessor
some motherboard with amibios from 1993
Windows 95
SB 16 PNP

not even able to play an wav… skipping and shuttering sound, but thats normal on a 386… 8)

Nothing was running in the background on my 1700 except some system-critical processes as winlogon.exe, sevices.exe, …
So…. its not only problem of sb live!
I will look at lowpass dsp unit times of processing and tell you.

  • You must to post comments
0
0

Thanks alot! Hope that fmod4 will fix the issue….

  • You must to post comments
0
0

I think that’s the issue of VBasic6 compiler. I’ll try modyfiying settings. I also believe this may be somehow dependant on my source.
This is somehow amazing, that no one had problem like this before.
Although, thanks for your reply.

  • You must to post comments
0
0

I have newest DirectX on each of mine machines (windowsupdate), so it’s probably 9.0b. I also tried newest SB live drivers, but they didn’t help at all.
Whoh, it’s probably hard to fix a problem which we can’t see, huh?

  • You must to post comments
0
0

well i must say that’s great news, only problem is – when can we expect it?

  • You must to post comments
0
0

No you arent the first, i had and have the same problem too. I have also created topic VERY high CPU usage on this forum, and nobody had a solution. Its all the same with 3.72 beta. And, it also happens with lowpass dsp. Only when stopped or paused or at end of file. I also use SB Live! and Win 2000. And just by the way, you have the bug in prereleased beta fmod dll. Just try to load some wma as sample.

  • You must to post comments
0
0

I also have DX9.0b. And newest SB drivers. Anyway i have tested the lowpass unit times. Nothing helpful, but here they are:
When the sound is playing, the dsp unit is processing for 0 ms.
When not, it takes 10 to 20 ms. But i think that GetTickCount is returning wrong values because it also says 10-20 when the computer is freezed with 10 eq effects and the mouse reacts every 3 seconds.

I have also tested it on 3 different pcs and all worked fine. They were all using WinXP. And the soundcard was integrated AC97. Reply to my email from creative was “try uninstalling the driver in safe mode and install it again in normal mode”. That didnt help of course. And brett, can you please send me some wma what did fmod sucessfully load as sample? I would like to try it, maybe i have a corrupted one. vilo999@pobox.sk

  • You must to post comments
0
0

i got new idea: i’m gonna use winamp.dll from Karlox and one of dsp- winamp plugins for an equaliser, i’m sure i’m gonna find suitable one.
the middle way between dx8 and fmod4 i guess…

  • You must to post comments
0
0

Ok i will try to reproduce it with c++ and then i will write here again.

About the dll:
I have redownloaded the dll and it does crash again.
When i load wma file as sample with the following code, [code:2djaegeb]
H = FSOUND_Sample_Load(0, tmpString, FSOUND_NORMAL Or MPEGACC Or HW3DFlag, 0, 0)[/code:2djaegeb] , whre tmpstring is “c:\a.wma”, MPEGACC=0 and HW3DFlag=0, FMOD will cause an access violation in MSCVRT.DLL at the end of loading a sample because it will take about 2 sec to crash.

The strange thing is, that if i “set next statement” from
780109B3 rep movs dword ptr [edi],dword ptr [esi]
to the next one,
780109B5 jmp dword ptr [edx*4+78010AC8h],
the sample will finish loading and play. I can then do anything with it. Hope this gives some sence.

  • You must to post comments
0
0

Well, i have downloaded 3 wma’s. Two of them load correctly. They are 48 kbps and 64 kbps. The third(and the fourth i have) are 128 kbps. They will crash fmod when loading as sample (not stream!) and exactly that happens that is described in my previous posts. Should not this to be a small bug in fmod? Have you tried to load 128 kbps wma?

  • You must to post comments
0
0

I was experiencing the same problem and I too have an SB Live, what I have done to get around the problem works but is dirty and has one slight side effect.

Firstly in the Stop Playing routine you will be doing this:

FSOUND_Stream_Stop streamHandle

Just after it pause the FSOUND_SYSTEMCHANNEL

i.e
FSOUND_SetPaused FSOUND_SYSTEMCHANNEL, True

No more crash

The same applies for the close sample routine. Also, if you want to use pause/unpause then set FSOUND_SYSTEMCHANNEL to true or false as well as the streamchannel.

The side effect is that because a buffer has been set during initialisation if you stop a file and then start it again (not reload) the buffer area gets played first. Pausing and unpausing works fine.

If somebody knows how to clear the buffer to stop it playing first I would be grateful if they post it.

  • You must to post comments
0
0

I am afraid that it wont be a vb compiler problem. I have reproduced both problems with c++. The code is a bit long to post here but i dont know where to upload that…

[code:11bg7dir]
// FMODTest.cpp : Defines the entry point for the application.
//

include "stdafx.h"

include <wingdi.h>

include "fmod.h"

include <commdlg.h>

long kanal;
char tmpchar[255]="\0";
long tmplong=0;

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
unsigned long suc=0;
int msgret;
FSOUND_SetBufferSize(100);
suc=FSOUND_Init(44100,32,FSOUND_INIT_GLOBALFOCUS | FSOUND_INIT_ENABLEOUTPUTFX);

if (!suc)
{
    MessageBox(NULL,&quot;Fmod failed to init, exiting!&quot;,&quot;Error&quot;,MB_ICONSTOP);
    goto exitapp;
}

msgret=MessageBox(NULL,&quot;Press Yes to load some wma as sample and Press No to test CPU freezing situation. Or, press Cancel to quit.&quot;,&quot;Choose&quot;,MB_YESNOCANCEL);

switch(msgret)
{
    case IDYES:
        OPENFILENAME ofn;
        memset(&amp;ofn, 0, sizeof(OPENFILENAME));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
        ofn.lpstrFilter = &quot;WMA audio\0*.wma\0\0&quot;;
        while (tmplong==255)
        {
            lstrcat(tmpchar,&quot;\0&quot;);
        }
        ofn.lpstrFile = tmpchar;
        ofn.nMaxFile = 256;
        ofn.lpstrFileTitle = tmpchar;
        ofn.nMaxFileTitle = 256;
        ofn.hwndOwner = NULL;
        ofn.nFilterIndex = 1;
        ofn.lpstrTitle = &quot;Load a wma...&quot;;
        GetOpenFileName(&amp;ofn);

        FSOUND_SAMPLE* smph;

        //***********************CRASH******************************
        smph=FSOUND_Sample_Load(0,ofn.lpstrFile,FSOUND_NORMAL,0,0);
        //***********************CRASH******************************

        if (!smph)
        {
            MessageBox(NULL,&quot;Error loading sample, exiting!&quot;,&quot;Corrupted wma?&quot;,MB_ICONSTOP);
            goto exitapp;
        }

        FSOUND_PlaySound(FSOUND_FREE,smph);

        MessageBox(NULL,&quot;Well, FMOD didnt crash.&quot;,&quot;OK&quot;,0);
        break;

    case IDCANCEL:
        goto exitapp;
        break;
    case IDNO:
        memset(&amp;ofn, 0, sizeof(OPENFILENAME));
        ofn.lStructSize = sizeof(OPENFILENAME);
        ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR;
        ofn.lpstrFilter = &quot;WMA audio\0*.wma\0MP3 audio\0*.mp3\0WAV audio\0*.wav\0\0&quot;;
        while (tmplong==255)
        {
            lstrcat(tmpchar,&quot;\0&quot;);
        }
        ofn.lpstrFile = tmpchar;
        ofn.nMaxFile = 256;
        ofn.lpstrFileTitle = tmpchar;
        ofn.nMaxFileTitle = 256;
        ofn.hwndOwner = NULL;
        ofn.nFilterIndex = 2;
        ofn.lpstrTitle = &quot;Load stream...&quot;;
        GetOpenFileName(&amp;ofn);

        FSOUND_STREAM* strh;
        strh=FSOUND_Stream_Open(ofn.lpstrFile,FSOUND_NORMAL,0,0);

        if (!strh)
        {
            MessageBox(NULL,&quot;Error loading stream, exiting!&quot;,&quot;???&quot;,MB_ICONSTOP);
            goto exitapp;
        }

        kanal=FSOUND_Stream_Play(FSOUND_FREE,strh);

        MessageBox(NULL,&quot;Now, after pressing ok this program will enable 3 disortion effects.&quot;,&quot;OK&quot;,0);

        FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL,1);
        msgret=FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_DISTORTION);

        if (!msgret)
        {
            MessageBox(NULL,&quot;Failed to enable 1st disortion effect, exiting!&quot;,&quot;Error&quot;,0);
            goto exitapp;
        }

        msgret=FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_DISTORTION);

        if (!msgret)
        {
            MessageBox(NULL,&quot;Failed to enable 2nd disortion effect, exiting!&quot;,&quot;Error&quot;,0);
            goto exitapp;
        }

        msgret=FSOUND_FX_Enable(FSOUND_SYSTEMCHANNEL,FSOUND_FX_DISTORTION);

        if (!msgret)
        {
            MessageBox(NULL,&quot;Failed to enable 3rd disortion effect, exiting!&quot;,&quot;Error&quot;,0);
            goto exitapp;
        }

        FSOUND_SetPaused(FSOUND_SYSTEMCHANNEL,0);

        MessageBox(NULL,&quot;Now the stream is playing and effects are enabled. So... press ok to pause the stream and freeze your computer.&quot;,&quot;OK&quot;,0);

        //********FREEZE***********
        FSOUND_SetPaused(kanal,1);
        //********FREEZE**********

        MessageBox(NULL,&quot;Slow, huh?&quot;,&quot;?&quot;,0);

        break;

}

exitapp:
FSOUND_Close();

return 0;

}[/code:11bg7dir]

Maybe its a SBLive! problem. But it does NOT happen in winamp or with bass.

  • You must to post comments
0
0

Post the file… but where? To support@fmod.org? And i dont know any free webhosting servers or some servers where i can upload some file!

  • You must to post comments
0
0

I am also having the same problem but I’m NOT using a SB Live card. I have a SoundMax Digital Audio card installed but as soon as I Call FSOUND_Stream_Stop(streamhandle) my cpu jumps to 100%. Has anyone found a fix for this? I’m using the lastest fmod.dll.

  • You must to post comments
Showing 1 - 20 of 34 results
Your Answer

Please first to submit.