Well , I am designing a media player for my own little gaming project ,
but I can’t seem to get the FSOUND_SAMPLE to load ,
I have code that loads and successfully plays any .xm , .it , .mid or .mod
file , and yet when I try to load a .mp3 file , fmod does not want to load it… :

I have some pseudo code : [code:hhkqpcsg]
...Init(...);//default settings -> 44khz , 32 channels...

This works when I compile it in "DOS" (console) mode , but when I plug it
into my WIN32 program , the I get the full path, the name… but the sample does not load…

I even tried converting the ‘\’ characters to ‘/’ but it still does not load mp3’s…. I’m using the MPEG_HALFRATE option to decrease the memory
footprint , and I’ve even tried using FSOUND_StreamOpen(…)…
But It still does not want to load the file…

I seem to be having problems with the integral functionality when running
on windows_hook mode.

I have tried loading music files (.mod,.xm) from the same directory that
I tried loading the mp3’s from and those seem to work , but the moment I try to load an mp3 I get an error (ERR_UNKNOWN). The sample simply will
not load.

I’ve tried running the exact same code in console mode , and it works perfectly for any type of file I can think of , and in any directory on my

Well , Im sorry , but if anyone has a bug fix then , can they please mail
it to me : shaheed.legion@gmail.com

thanks : FMOD is GREAT!
(just downloaded EX…can’t wait to use it!)

  • You must to post comments

The fact that you can load mp3s in console mode but not in windowed mode suggests that the problem lies in your code, not in FMOD. What is the error code returned from FSOUND_Sample_Load? Can you load .wav files in windowed mode?

  • You must to post comments

Hi , thanks , well – I feel kind of silly ,
I found the bug , after spending at least seven
hours with my debugger….

You won’t believe what kind of fool I feel like ,
well , to sum it up – you’re right , the bug was in
my code….. and you’re definitely going to laugh when
you see this (this qualifies to go on the top ten list of
bugs that can ruin your day (in C))

I must admit that I found this bug buried beneath
750 lines of code , well – heres the legendary bug :

if(sample = NULL)//this is an assignment!!!

Well , I sincerely apologise for wasting your time with my
silly bug , I promise that I will read my code more carefully
before running to the pros for help.

Thank you for your concern.

  • You must to post comments

Many compilers will give you a warning about "unintentional assignment" on code like that.

  • You must to post comments

Well ,Andrew , I’m using MSCV 6.0 , and PellesC compiler , along
with LCC-Win32 base system , and the code compiles without warnings
or errors on all of my compilers.

I believe the reason is that I have already assigned the module to NULL , the bug is simply a second assignment , therefore the compiler allows it to happen since the module is already null , let’s simply make it even more null , also – C is the only language that allows you to shoot
yourself in the foot without a gun.

Thanks : Max

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.