在 AMD64 上可以了

昨天晚上开始调试 AMD64 上的段错误问题, 最大的一个问题当然就是指针长度的问题, 解决办法是在 All.h 和 NoWindows.h 中分别针对 Win 和其他系统定义 int64 和 uint64, 然后把 APEInfo::GetInfo() 相关的都改过. 这下不会段错误了. 但感觉解决方法也不算完美, 这个问题的关键是要用数字类型来传递指针, 所以要保证这个参数的类型以及返回值的长度要大于等于指针的长度. 叫做 int64 就不能把指针这个隐藏的东西给表现出来, 不够完美.

接下来的问题也很类似, 几个相关的结构体中用了 long 或者 unsigned long 来表示 32 位(又是古老的历史, 32 位为什么要用 long, 很多有关 WAVE 格式的介绍中都用 long 指明 32 位, 当然也有很多直接指明字节数), 把相应的改过, 在 AMD64 Linux 下就可以正确地编码解码了. 一会就提交当前的改动.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
a_phabetical: