在 iPhone 上使用 timidity lib
我的 iPhone 应用程序应该播放 midi 文件,不幸的是 iPhone 不支持它们。我为我的项目移植了胆怯。它成功编译并安装在设备上。但是当我尝试将 midi 转换为 wav 时 - 在调试控制台中收到以下消息:
/usr/local/share/timidity/timidity.cfg:没有这样的文件或目录 胆怯:无法读取任何配置文件。 请检查/usr/local/share/timidity/timidity.cfg
有人!请!谁有解决方案或任何想法请帮忙!)
My iPhone app should play midi files, unfortunelly iPhone does not supported them. I ported timidity for my project. It successfully compiles and installs on device. But when i try to convert midi to wav - get the following message in debugging console:
/usr/local/share/timidity/timidity.cfg: No such file or directory
timidity: Can't read any configuration file.
Please check /usr/local/share/timidity/timidity.cfg
Somebody! Please! Who have solutions or any ideas please help!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
警告:我从来没有使用过胆怯。
看起来胆怯需要一个配置文件,并且我希望配置文件有一个硬编码的(或者可能是 autoconf 操纵的)默认位置。显然,这在 iPhone 上不起作用,因为您的应用程序包将安装在它自己的沙箱中。
看这里:
http://ccrma.stanford.edu/planetccrma/man/ man5/timidity.cfg.5.html
使用 timidity 实用程序,您可以传入配置文件 (-c) 或搜索路径 (-L)。您将需要在端口中调用等效功能,并在运行时使用类似以下内容:
提取放置配置文件和声音字体文件的位置。
希望有帮助。
Caveat: I've never used timidity.
It would appear that timidity needs a configuration file, and I expect that there is a hardcoded (or possibly autoconf manipulated) default location for the configuration file. Clearly, this won't work on the iPhone since your application bundle will be installed in it's own sandbox.
Looking here:
http://ccrma.stanford.edu/planetccrma/man/man5/timidity.cfg.5.html
It would appear that using the timidity utility you can pass in a configuration file (-c) or a path to search (-L). You will need to call the equivalent functionality in your port and at runtime use something like:
To pull out the location of where you've put the config file and soundfont files.
Hope that helps.