hello, everyone, and thanks for this wonderul API…
I have been working on a sound system for my game for some time, under Linux, and it works great, when switching to Windows, and using FSOUND_OUTPUT_WINMM everything works fine, just like Linux, but when I switch to FSOUND_OUTPUT_DSOUND, FSOUND_SAMPLE returned by FSOUND_Sample_Load isn’t always valid, so I get an error when trying to use it later, I searched the forums, and found something about using FSOUND_FREE, made sure that my program actually use it, but still I have the same error, so my question is, what else (besides FSOUND_FREE), should I do to make FSOUND_OUTPUT_DSOUND work.
Note: Examples work fine.
Thanks in advance.
- game_programmer asked 14 years ago
This reminds me of a bug in fmod 3.6x (I don’t know if it is 3.7x): FSOUND_FORCEMONO does not work with looping samples: it plays at the default sample rate the first time round the loop, then double the second time, double again the third time, etc. It works fine with looping streams though.
What made me suggest stereo files and HW3D is it plays back without error or warning using the fmod software mixer (i.e. when there is no HW3D acceleration like on Linux or WinMM), though it does sound rather strange. However when switching to direct sound and an sblive/audigy/audigy2, FSOUND_CheckError says something about being unable to allocate a buffer and the sample does not load.
>what flags are you passing to FSOUND_Sample_Load? And what format is the sample you are trying to load?
for 2D sounds:
FSOUND_LOADMEMORY | FSOUND_2D | FSOUND_LOOP_NORMAL
for 3D sounds:
FSOUND_LOADMEMORY | FSOUND_HW3D | FSOUND_LOOP_NORMAL
File format is wav (small files)
>Perhaps you’re trying to 3d position stereo sounds and using FSOUND_HW3D.
I set 3D positions with:
Anything wrong here?
PS: I would have posted to code, sound classes are in one file, but it’s huge, and filled with game-related stuff…
Thanks for you efforts
Please login first to submit.