Is there a way to not use FMOD for FFT/Spectrum retrieval i.e. “ofSoundGetSpectrum”, if so, how do I switch from FMOD to any other free for commercial use library, like OpenAL, for which I already think is integrated in OF, but there’s a pre-processor definition that prevents it to be used as a primary sound library ?
openAL is the default for linux but you can change ofConstants.h to use openAL instead of fmod but you’ll need to compile openAL, kiss (the library used for fft) libsndfile ( the one for reading sound files) and in case you want to use mp3 mpg123.
Thanks for your reply, I did what you suggested, and successfully compiled OF with the changed sound engine, and now I have some linker errors giving me problems that I can’t seem to solve:
1>Link:
1> Creating library bin\soundPlayerFFTExample.lib and object bin\soundPlayerFFTExample.exp
1>openframeworksLib.lib(ofSoundPlayer.obj) : error LNK2019: unresolved external symbol "public: static float * __cdecl ofOpenALSoundPlayer::getSystemSpectrum(int)" (?getSystemSpectrum@ofOpenALSoundPlayer@@SAPAMH@Z) referenced in function "float * __cdecl ofSoundGetSpectrum(int)" (?ofSoundGetSpectrum@@YAPAMH@Z)
1>openframeworksLib.lib(ofSoundPlayer.obj) : error LNK2019: unresolved external symbol "public: __thiscall ofOpenALSoundPlayer::ofOpenALSoundPlayer(void)" (??0ofOpenALSoundPlayer@@QAE@XZ) referenced in function "public: __thiscall ofSoundPlayer::ofSoundPlayer(void)" (??0ofSoundPlayer@@QAE@XZ)
1>bin\soundPlayerFFTExample.exe : fatal error LNK1120: 2 unresolved externals
I’m using the 0.7 pre-release version from the downloads page, I just changed what you suggested and recompiled, other than that I did nothing to the original source though.
Also those functions that the linker seems to miss, do actually exist in the ofOpenALSoundPlayer.h/cpp.
I don’t remember linking OpenFrameworks to OpenAL, could that cause the problem ?
The problem was that ofOpenALSoundPlayer.h/cpp weren’t compiled with the OF project, so I added them, and the libraries that weren’t already compiled (kissfft was the only one I think), and now that that’s done, it compiles and runs fine, but I don’t hear anything, and it can’t play MP3s for some reason, so I converted my file to wav, and still nothing… Any ideas ? Here’s how I’m trying to do it:
i’m willing to use also openAL and i’m facing similar problems as you did …
did you solved them ? have you been able to use openAL for playing sounds ?
i know you’ve done trough all this “stuff” so i’d appreciate a little route map on what’s the best way to do all this and of course to get to know if at the “end” of this pain, openAL was working ?