Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 Fmod.dll 的 Sound::readData 从 mp3 文件中获取数据;
无效 *pointer1 = 新字节[4096];无符号整数长度;
系统-> createSound(filePath, FMOD_OPENONLY | FMOD_ACCURATETIME, NULL, &sound);
sound-> readData(pointer1, 4096, &length);
但是所有 4096 字节都是 0,有谁知道出了什么问题?
FMOD_ACCURATETIME 标志可能使它扫描到文件的末尾,所以你得到了一个 EOF,如果有,你检查错误代码吗?删除 FMOD_ACCURATETIME 或尝试 sound->seekData(0); 在 readdata 调用之前