[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.
device_inited = FSOUND_Init(device_freq, device_channels, 1 Or 2 Or 4)
Everything runs smooth.
When I enable FX like this:
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)
FSOUND_SetPaused FSOUND_SYSTEMCHANNEL, False
eq_inited = eq_handle(1) > 0
Yeah, the equaliser i wrote runs perfect too.
But when i try to stop the file:
Do Until FSOUND_Stream_GetOpenState(.handle) = 0
FSOUND_Stream_Stop .handle ‘here is the freezing
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?
- aceton asked 13 years ago
that’s a pity, that fmod is still not fixed for the topic issue. i had to write code to detect if the soundcard is sb live and if is then disable FX. that’ sucks so much, but i have to if i want my software to be stable. i must also confess, that i made fmod one of plugins, lowering its priority from the most important to as much important as dshow, bass or winamp plugins.
i still hope, that some day this problem will be fixed. i have a dream that when i start using fmod4 all the problems will suddenly disapear. but my dreams never come true.
On my machine, the problem does not depend on language used. I tried VB, C++, even IBasic. Still the same. As tbe said, after pause pause the systemchannel too. This partially works for me. Pause/unpause – ok. Stop – in my app its just pause and then seek file to pos 0.
But what if the stream comes to end? The buffer will run out and the machine will freeze again. This happens also on my Manli CME8738 sound card as mentoined before in this topic. There must be some solution!
- Vilo answered 12 years ago
i can’t force all users of my software possesing sb live to look for newest drivers (if mine are not) because they would just say “hey, why should i use your soft if other works perfectly”. That’s why i mention winamp. Or, if you don’t like comparing program to a library you can compare winamp playback library to fmod.
as long as other software works (even if not using dx8) perfectly i expect fmod will do to.
that’s why i still claim that it is a bug in fmod.
i also agree that sb live drivers suck. total incompatibility.
Thats great! The idea to detect sblive never got up in my mind. But how to do that? Can you please email me the code? I was trying to load fmod and bass together, play a stream with fmod and then enable fx with bass, so fmod wont know about it. But bass cannot enable fx on global system channel because i dont know how to get its handle… It isnt -1000 like in fmod.
OK, sorry, I forgot to add open file and play file:
.handle = SOUND_Stream_Open(file_path, FSOUND_MPEGACCURATE, 0, 0)
.channel = FSOUND_Stream_PlayEx(FSOUND_FREE, media(current_media).handle, 0, False)
Once again, any suggestions?
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:
NVIDIA nForce(TM) Audio Codec Interface
My third PC:
Fujitsu Siemens MOBO
Intel AC’97 Audio – SigmaTel
My first PC:
More to come.
sorry for the delay
‘ IN MODULE
Global Const c_SBLive = "SB Live"
‘ IN INIT FMOD SUB:
‘ INIT OUTPUT AND DEVICES
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
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))
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
Pentium III 450 MHZ
MB BrillianX series I440BX
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.
AMD am-386DX40 without coprocessor
some motherboard with amibios from 1993
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.
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.
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. email@example.com
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.
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?
Please login first to submit.