I have just released version 0.2 of my native GNU/Linux implementation of ff123's ABC/HR audio comparison tool. The source code is available at http://www.xiph.org/~carsten/abchr-0.2.tar.gz (Sorry, no binaries are available.)

You'll need wxWindows, libSDL, and libaudiofile to compile this program.

I figured out what's wrong. It's a conflict between SDL and wxWindows on Mac OS X. SDL defines main to be SDL_main (or something) and this makes IMPLEMENT_APP() do something other than what it's supposed to do. Unfortunately, I don't know enough C++ to solve this.

@c_haese: Is there any chance you could make it so SDL_audio.h isn't included when compiling abchr.cpp?

Actually, the accelerator stuff is dead code, left over from an as-yet unsuccessful attempt to provide keyboard accelerators for the pushbuttons (which wxGTK doesn't provide natively). So, you may safely delete this line and the three lines immediately before it.

I figured out what's wrong. It's a conflict between SDL and wxWindows on Mac OS X. SDL defines main to be SDL_main (or something) and this makes IMPLEMENT_APP() do something other than what it's supposed to do. Unfortunately, I don't know enough C++ to solve this.

@c_haese: Is there any chance you could make it so SDL_audio.h isn't included when compiling abchr.cpp?

That's not going to be possible, or at least I don't see how this would be possible. abchr.cpp needs to include wavplayer.h, which in turn needs SDL_audio.h. Also, this is not going to solve the problem.

The second question on http://www.libsdl.org/faq.php?action=liste...ries&category=7 seems to apply perfectly to your problem, and it mentions three things that *must* be done, but unfortunately I can't test any of this. It looks like you need to add something like #include <SDLMain.h> and #include <SDLMain.m> to abchr.cpp. (I don't know what a .m-file is, but they say it must be "included," and they mention it in the same breath as the .h-file, so I'm guessing they mean an #include directive.)

The second and third thing that they mention are taken care of through the IMPLEMENT_APP macro, I think.

I'd like to say a big thank you to everybody that has tried to build this program on platforms that I would never have dreamed of supporting

I'll do as much as I can to help resolve build problems, but since I can't test any solutions myself, a lot of experimentation on your part will be necessary. Of course, once solutions are found, I'll be happy to integrate patches.

Actually, the accelerator stuff is dead code, left over from an as-yet unsuccessful attempt to provide keyboard accelerators for the pushbuttons (which wxGTK doesn't provide natively). So, you may safely delete this line and the three lines immediately before it.

Could you email me a complete backtrace from gdb? This problem does not happen with wxWindows 2.2, and I can't tell whether this is a wxWindows bug, or if I'm doing something wrong that wxWindows 2.2 forgives and wxWindows 2.4 blows up on.

I think I will put this project up on sourceforge and set up a mailing list so we don't need to spam HA with these build and crash problems

Another alternative is to use a slightly simpler API, such as Portaudio or your (as in Xiph) own ao Is it something that you would like to do, or should I give it a go when I have the time?

BTW, .m is the suffix for Objective-C. It's basically C with classes, and unlike that other C-based language, it's syntax is a superset of C syntax.

I did try ao in the infancy stages of this project, but it doesn't give low enough latency to perform the (seemingly) immediate switching between files. The buffer is too big, and there's no way to make it small enough.

I don't know anything about Portaudio, but I have heard good things about it. I may look into it, but I'm not making any promises. Alternatively, I welcome patches that would replace SDL with Portaudio (although I don't even want to begin to contemplate what that would do to the autoconf stuff ). The necessary changes should be fairly self-contained in the wavplayer class.

Have you at least tried to add the two include directives near the top of abchr.cpp? If so, what was the outcome?

Actually, the accelerator stuff is dead code, left over from an as-yet unsuccessful attempt to provide keyboard accelerators for the pushbuttons (which wxGTK doesn't provide natively). So, you may safely delete this line and the three lines immediately before it.

If I comment out this line, it builds fine (after doing some little patching).

It also runs basically but the instant switching is unusable - there are often delays > 5 seconds. The "Enable Instant Switching" Checkbox doesn't seem to have any effect on this either.

It also runs basically but the instant switching is unusable - there are often delays > 5 seconds. The "Enable Instant Switching" Checkbox doesn't seem to have any effect on this either.

What the instant switching checkbox controls is whether the new sample restarts at the beginning or picks up where the current sample leaves off. What exactly do you mean by a 5 second delay? Do you mean there's a 5 second delay between clicking the button and noticing a reaction? If that's the case that would be, needless to say, unacceptable. Could you provide some detail about your platform and the sound files you're using? (You may send those by email to my address in the AUTHORS file, if you prefer.)

It also runs basically but the instant switching is unusable - there are often delays > 5 seconds. The "Enable Instant Switching" Checkbox doesn't seem to have any effect on this either.

What the instant switching checkbox controls is whether the new sample restarts at the beginning or picks up where the current sample leaves off. What exactly do you mean by a 5 second delay? Do you mean there's a 5 second delay between clicking the button and noticing a reaction? If that's the case that would be, needless to say, unacceptable. Could you provide some detail about your platform and the sound files you're using? (You may send those by email to my address in the AUTHORS file, if you prefer.)

Carsten.

OK. So i must have misinterpreted the checkbox.

Anyway - Yes there is a ~5 second delay between clicking the button and noticing a reaction (The CPU is pretty idle at that time).

I'm running FreeBSD CURRENT using wxgtk-2.4.2, sdl-1.2.5 and libaudiofile-0.2.4. The sound files were some of the latest 64k listening test.

Since this might be of interest to more than the handful of people that have so far subscribed to the abchr-users mailing list, I'll announce this here, too:

I have uploaded a forked version of 0.2 with *experimental* portaudio support to replace SDL. If you have problems with SDL, please give the portaudio version a try, and let me know if it works better (or at all ). Even if the SDL version works for you, I'd appreciate some feedback on the portaudio fork. If portaudio works well enough, I might scrap SDL altogether.

P.S. The portaudio stuff is an ugly lunch-break hack. No configure support (you may have to hand-edit the Makefile) and virtually no checking of error return codes. If this fork turns out to be successful, I'll fill in the gaps later.