Hi, i am having trouble when setting this frequency. first off, let me explain
what i am doing. my media player is plugin based, which means i have no
idea if any one will write an input plugin with FMOD or not. so, when i write
plugins for my player, i have to Init fmod ONLY when i am going to play a
song with that plugin and Close it when i am finished, so they don’t interfere
cuz each plugin has it’s own settings, like output frequency and sound device

This is a bit hard to explain, but the prog crashes for some reason.
ok, when i use 44100 as freq, it works right. my buffersize is 100 miliseconds
and the length of the DSP buffer is 1024. so, i plot the data from 0 to 64
and step it by 16, cuz that is how much i divide 1024 by to get 64. all is well
and works just fine, untill i lower the frequency. it also crashes at higher
freqs as well. i did a test with 8000khz and it plays and i get the wave, but
when i close down and re-init for the next song (which really sucks) it crashes
sometimes it takes a while before it crashes, but it does. if i turn off my
wave form display it does not crash. i still get the buffer pointer. but
if i call something like This = Wave[intX * 16] it will crash if it is not at
44100 and if i do not use FSOUND_DSP_GetBufferLength. Even with out
the * 16 part and just = Wave[intX]. i tryed 11025, 22050 and 44100 will crash it if i call FSOUND_DSP_GetBufferLength. could there be a problem
with that function???? probably not, since the other freqs will crash weather
i call it or not. 👿

I am sorry i cannot explain it better, i am having a hard time explaining it
to myself. I don’t think it has anything to do with the frequent calles to
FSOUND_Close and init, cuz it works with 44100 and no

here is some code:
Code is NOT visual basic, but more like c, yet not exactly it is translated
to C and then compiled with LCC.


'Attempt to initialize
'intFreq = Val(GetComboText$(cmbFreq, GetComboItem(cmbFreq)))
'MsgBox Str$(intFreq)
intFreq = 11025
If bInit = False Then
    'MsgBox "Error initializing sound engine.", "Error", MB_OK | MB_ICONERROR
    Function = 1    'Error, XMP will not attempt to play file
End If

This code is for opening the file.

‘this is for stopping the stream:

i get the buffer pointer for the waveform, and that works, but if i try to
read it, it crashes. that is as much as i have figured out. maybe i am over
stressing FMOD?

well, if anyone can help or explain what i cannot, that would be hugely appricaited. Thank you.

  • You must to post comments

Thanks, i’ll try that

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.