- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想播放一个 mp3 文件,所以我搜索并了解了 FMOD。我下载了http://www.fmod.org/download/ (用于 Linux 的 FMOD Studio 程序员 API)。
我还收到关于 fmod.hpp not found 的错误,所以我将 inc 文件夹中的所有头文件复制到 examples 文件夹并删除了它们,但我现在明白了。
现在我尝试编译 play_stream.cpp 示例,但我明白了,但我完全不知道我在看什么。任何人都可以解释我做错了什么吗?
$ gcc play_stream.cpp
/tmp/ccCYnnTg.o: In function `main':
play_stream.cpp:(.text+0x24): undefined reference to `Common_Init(void**)'
play_stream.cpp:(.text+0x40): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x54): undefined reference to `FMOD::System::getVersion(unsigned int*)'
play_stream.cpp:(.text+0x64): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x8b): undefined reference to `Common_Fatal(char const*, ...)'
play_stream.cpp:(.text+0xaf): undefined reference to `FMOD::System::init(int, unsigned int, void*)'
play_stream.cpp:(.text+0xbf): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0xcb): undefined reference to `Common_MediaPath(char const*)'
play_stream.cpp:(.text+0xf5): undefined reference to `FMOD::System::createSound(char const*, unsigned int, FMOD_CREATESOUNDEXINFO*, FMOD::Sound**)'
play_stream.cpp:(.text+0x105): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x119): undefined reference to `FMOD::Sound::getNumSubSounds(int*)'
play_stream.cpp:(.text+0x129): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x14d): undefined reference to `FMOD::Sound::getSubSound(int, FMOD::Sound**)'
play_stream.cpp:(.text+0x159): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x18f): undefined reference to `FMOD::System::playSound(FMOD::Sound*, FMOD::ChannelGroup*, bool, FMOD::Channel**)'
play_stream.cpp:(.text+0x19f): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x1a4): undefined reference to `Common_Update()'
play_stream.cpp:(.text+0x1b0): undefined reference to `Common_BtnPress(Common_Button)'
play_stream.cpp:(.text+0x1c8): undefined reference to `FMOD::ChannelControl::getPaused(bool*)'
play_stream.cpp:(.text+0x1d8): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x1f3): undefined reference to `FMOD::ChannelControl::setPaused(bool)'
play_stream.cpp:(.text+0x203): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x20f): undefined reference to `FMOD::System::update()'
play_stream.cpp:(.text+0x21f): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x259): undefined reference to `FMOD::ChannelControl::isPlaying(bool*)'
play_stream.cpp:(.text+0x277): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x28b): undefined reference to `FMOD::ChannelControl::getPaused(bool*)'
play_stream.cpp:(.text+0x2a9): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x2c5): undefined reference to `FMOD::Channel::getPosition(unsigned int*, unsigned int)'
play_stream.cpp:(.text+0x2e3): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x2ff): undefined reference to `FMOD::Sound::getLength(unsigned int*, unsigned int)'
play_stream.cpp:(.text+0x31d): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x329): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x335): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x341): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x34d): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x359): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x365): undefined reference to `Common_BtnStr(Common_Button)'
play_stream.cpp:(.text+0x375): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x381): undefined reference to `Common_BtnStr(Common_Button)'
play_stream.cpp:(.text+0x391): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x39d): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x501): undefined reference to `Common_Draw(char const*, ...)'
play_stream.cpp:(.text+0x50d): undefined reference to `Common_Sleep(unsigned int)'
play_stream.cpp:(.text+0x519): undefined reference to `Common_BtnPress(Common_Button)'
play_stream.cpp:(.text+0x530): undefined reference to `FMOD::Sound::release()'
play_stream.cpp:(.text+0x540): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x54c): undefined reference to `FMOD::System::close()'
play_stream.cpp:(.text+0x55c): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x568): undefined reference to `FMOD::System::release()'
play_stream.cpp:(.text+0x578): undefined reference to `ERRCHECK(FMOD_RESULT)'
play_stream.cpp:(.text+0x57d): undefined reference to `Common_Close()'
/tmp/ccCYnnTg.o: In function `FMOD::System_Create(FMOD::System**)':
play_stream.cpp:(.text._ZN4FMOD13System_CreateEPPNS_6SystemE[_ZN4FMOD13System_CreateEPPNS_6SystemE]+0xd): undefined reference to `FMOD_System_Create'
/tmp/ccCYnnTg.o:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
最佳答案
您可能还需要在项目设置中包含要链接的库。对于 FMOD,您需要链接到
它们位于 .../api/lowlevel/lib 或 .../api/studio/lib 中,在您下载的包内。
一旦完成,编译器就可以找到您的代码引用的外部符号。
关于c++ - FMOD 播放流示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25142433/
我研究了旧代码,看到了这样一个函数: inline double mod(double x, double y) { return x-y*floor(x/y); } fmod 是完全等效的,
我遇到了一个非常奇怪的情况:在我正在开发的多线程应用程序中,在某个代码点 fmod(x,y) 返回 -1.#IND00 而 double x = 0.0 和 double y = 1.0。当然,我仔细
这个问题在这里已经有了答案: Is floating point math broken? (31 个答案) 关闭 4 年前。 当我调用我的函数时: formatCurrency(7.5); str
当我在 C++ 中使用 fmod(0.6,0.2) 时,它返回 0.2 我知道这是由浮点精度引起的,但现在看来我必须得到两个双倍的余数 非常感谢对此类问题的任何解决方案 最佳答案 数学值 0.6 和
我试图在 3D 平面中表示声音的频谱,但我只能播放声音而无法将 dsp 放入结构 FMOD_DSP_PARAMETER_FFT,numchannels 和 length 始终 = 0 我的代码是这样的
好的,我希望我不要搞砸了,我已经寻找了一些答案,但找不到任何东西。我正在尝试在 3D 模式下使用 FMOD 声音播放器在 openframeworks 中制作一个简单的采样器。我可以使单个实例正常工作
这可能是 FMOD 的内置功能,但我想看看是否可以覆盖它。 使用 FMOD_System_PlaySound 播放声音时, FMOD_System_PlaySound( system, FMOD_CH
为什么 PHP 的 fmod 函数不能按预期工作。我错过了什么吗? fmod(2.0, 0.1); // outputs 0.1 以下应输出 0,因为 2.0/0.1 = 20,因此没有余数。我知道
任何人都可以帮助我使用 FMOD 或任何其他方式从内存流中播放文件吗? 到目前为止我有这个: 变量 private FMOD.System _fmod = null; private
我想使用 Cpp 计算阶乘中零的个数。问题是当我使用非常大的数字时。 #include #include long zeroesInFact(long n) { long double fact=
我从 fmod 教程中几乎逐字复制了以下代码块,对变量名进行了细微修改,以免与任何内容发生冲突。我的代码在没有任何 fmod 语句的情况下编译得很好。当我放入 FMOD_RESULT fm_resul
我想知道我是否做错了什么。我已经将我的 SoundManager 类设置为有 5 个不同的 channel ,在我的游戏中可能会同时播放一些声音,比如开枪和敌人“受伤”的声音......这就是我设置
在代码中: FMOD_RESULT result; FMOD::System *system; result = FMOD::System_Create(&system); FMODErrorChec
首先,我正在为学校做这个项目,我们不允许使用外部库,因此我不能使用 GMP 之类的东西。问题是,我有一个函数需要一些“艰难”的计算。即, m^e mod n 这是我的代码 #include #inc
使用 FMOD(交互式音频中间件),是否可以在播放轨道时实时计算其每秒节拍数? 我找不到太多关于此的信息,这将非常有用。将使用 c# 但能够翻译。 谢谢 最佳答案 FMOD 不提供任何计算每分钟节拍的
我想播放一个 mp3 文件,所以我搜索并了解了 FMOD。我下载了http://www.fmod.org/download/ (用于 Linux 的 FMOD Studio 程序员 API)。 我还收
我的问题是从模计算中获得最准确的结果,我得到余数答案以进行另一次舍入计算,因此我确实需要一个准确的结果。 double a = 0.12345678...(可能有很多数字); double b = f
我开始使用 FMOD 库,因为我需要在 C# 应用程序中播放没有间隙的声音(循环中的一个声音和序列中的许多声音)。谁能告诉我正确的方法吗?我尝试根据示例制作一些东西,但它没有像我希望的那样工作。首先,
我正在尝试设置我的声音管理器 (FMOD) 以在不同的 channel 上播放背景音乐和其他 Action 声音,据我所知,这是使用 FMOD 同步声音的唯一方法....我的设置是下面,如果我调用 p
我开始使用 FMOD API,但我在播放声音时遇到了问题。我使用了本网站的教程:http://glasnost.itcarlow.ie/~powerk/audio/AddFMODtoaproject.
我是一名优秀的程序员,十分优秀!