Skip to main content

Topic: ABC/HR Audio Comparison for GNU/Linux (Read 5799 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Hiya everybody,

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.

Cheers,

Carsten Haese

Update: I have registered the project on Sourceforge, and the link above is now dead. Please go to http://sourceforge.net/project/showfiles.p...lease_id=189461 to download.
  • Last Edit: 08 October, 2003, 11:09:36 AM by c_haese

  • JohnV
  • [*][*][*][*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #1
Thanks Carsten.
Juha Laaksonheimo

  • danchr
  • [*][*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #2
Quote
You'll need wxWindows, libSDL, and libaudiofile to compile this program.

Hmmm, all of these exist for Mac OS X - and don't require X11. I just have to try compiling this

ABC/HR Audio Comparison for GNU/Linux
Reply #3
Code: [Select]
<delete-me>
 <reason>
     I'm wrong again.
 </reason>
</delete-me>
  • Last Edit: 05 October, 2003, 07:31:54 AM by AstralStorm
ruxvilti'a

  • danchr
  • [*][*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #4
After hacking some Makefiles, etc., I got it to compile, only to end up with this:
Code: [Select]
ld: Undefined symbols:
_main


Does anyone who has experience with wxWindows know how to solve this? It doesn't seem to be declared in libwx_mac, and it doesn't seem like SDLMain is the one wanted instead.

ABC/HR Audio Comparison for GNU/Linux
Reply #5
I get the following error after a successfull configure with wxGTK 2.4.1 and gcc 3.3.1
it's probably caused by the much stricter c++ syntax checking of gcc 3.3

Code: [Select]
source='abchr.cpp' object='abchr.o' libtool=no \
depfile='.deps/abchr.Po' tmpdepfile='.deps/abchr.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
g++ -DPACKAGE=\"abchr\" -DVERSION=\"0.2\"  -I. -I.     -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -I/usr/include/SDL -D_REENTRANT -c -o abchr.o `test -f abchr.cpp || echo './'`abchr.cpp
abchr.cpp: In constructor `CAbchrFrame::CAbchrFrame(const wxString&, const
  wxPoint&, const wxSize&)':
abchr.cpp:164: error: no matching function for call to `CAbchrFrame::
  SetAcceleratorTable(wxAcceleratorTable*&)'
/usr/include/wx/window.h:519: error: candidates are: virtual void
  wxWindowBase::SetAcceleratorTable(const wxAcceleratorTable&)
make: *** [abchr.o] Error 1
  • Last Edit: 05 October, 2003, 10:50:02 AM by Slo Mo Snail

  • danchr
  • [*][*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #6
Quote
I get the following error after a successfull configure with wxGTK 2.4.1 and gcc 3.3.1
it's probably caused by the much stricter c++ syntax checking of gcc 3.3

That's odd, I was able to compile it successfully with wxMac 2.4.1 and Apple GCC 3.3.

  • caligae
  • [*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #7
Quote
I get the following error after a successfull configure with wxGTK 2.4.1 and gcc 3.3.1
it's probably caused by the much stricter c++ syntax checking of gcc 3.3

I got the same error here but haven't looked at it too close yet. My first idea would be some incompatibility between wxWindows 2.2 and 2.4 but haven't tested this yet either.

  • danchr
  • [*][*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #8
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?

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #9
Quote
I get the following error after a successfull configure with wxGTK 2.4.1 and gcc 3.3.1
it's probably caused by the much stricter c++ syntax checking of gcc 3.3

Code: [Select]
source='abchr.cpp' object='abchr.o' libtool=no \
depfile='.deps/abchr.Po' tmpdepfile='.deps/abchr.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
g++ -DPACKAGE=\"abchr\" -DVERSION=\"0.2\"  -I. -I.     -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -I/usr/include/SDL -D_REENTRANT -c -o abchr.o `test -f abchr.cpp || echo './'`abchr.cpp
abchr.cpp: In constructor `CAbchrFrame::CAbchrFrame(const wxString&, const
  wxPoint&, const wxSize&)':
abchr.cpp:164: error: no matching function for call to `CAbchrFrame::
  SetAcceleratorTable(wxAcceleratorTable*&)'
/usr/include/wx/window.h:519: error: candidates are: virtual void
  wxWindowBase::SetAcceleratorTable(const wxAcceleratorTable&)
make: *** [abchr.o] Error 1

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.

Hope this helps,

Carsten.

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #10
Quote
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.

Hope this helps,

Carsten.

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #11
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.

Best regards,

Carsten.

ABC/HR Audio Comparison for GNU/Linux
Reply #12
Quote
Quote
I get the following error after a successfull configure with wxGTK 2.4.1 and gcc 3.3.1
it's probably caused by the much stricter c++ syntax checking of gcc 3.3

Code: [Select]
source='abchr.cpp' object='abchr.o' libtool=no \
depfile='.deps/abchr.Po' tmpdepfile='.deps/abchr.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
g++ -DPACKAGE=\"abchr\" -DVERSION=\"0.2\"  -I. -I.     -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -I/usr/include/SDL -D_REENTRANT -c -o abchr.o `test -f abchr.cpp || echo './'`abchr.cpp
abchr.cpp: In constructor `CAbchrFrame::CAbchrFrame(const wxString&, const
  wxPoint&, const wxSize&)':
abchr.cpp:164: error: no matching function for call to `CAbchrFrame::
  SetAcceleratorTable(wxAcceleratorTable*&)'
/usr/include/wx/window.h:519: error: candidates are: virtual void
  wxWindowBase::SetAcceleratorTable(const wxAcceleratorTable&)
make: *** [abchr.o] Error 1

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.

Hope this helps,

Carsten.

Yes it works... thanks

ABC/HR Audio Comparison for GNU/Linux
Reply #13
When starting and closing abchr without doing anything it segfaults (last lines of a ltrace) with

Code: [Select]
_ZN12wxWindowBase11RemoveChildEPS_(0x08155728, 0x08207ea0, 0x080cdbf8, 0x402de4fb, 0x404b8e48) = 1
_ZN12wxWindowBase11RemoveChildEPS_(0x080cea48, 0x08155728, 0xbffff470, 0x404c3304, 0x404b8e48) = 1
--- SIGSEGV (Segmentation fault) ---
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
+++ exited (status 245) +++

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #14
Quote
When starting and closing abchr without doing anything it segfaults (last lines of a ltrace) with

Code: [Select]
_ZN12wxWindowBase11RemoveChildEPS_(0x08155728, 0x08207ea0, 0x080cdbf8, 0x402de4fb, 0x404b8e48) = 1
_ZN12wxWindowBase11RemoveChildEPS_(0x080cea48, 0x08155728, 0xbffff470, 0x404c3304, 0x404b8e48) = 1
--- SIGSEGV (Segmentation fault) ---
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
+++ exited (status 245) +++

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

Best regards,

Carsten.

ABC/HR Audio Comparison for GNU/Linux
Reply #15
You have mail

  • danchr
  • [*][*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #16
Concerning SDL_audio...

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.
  • Last Edit: 06 October, 2003, 11:47:40 AM by danchr

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #17
Quote
Concerning SDL_audio...

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?

  • caligae
  • [*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #18
Quote
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.

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #19
Quote
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.

  • caligae
  • [*][*][*]
ABC/HR Audio Comparison for GNU/Linux
Reply #20
Quote
Quote
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.

When I'm back home again I'll try if I'm able to give more details.

edit: fixed packages/versions
  • Last Edit: 07 October, 2003, 09:21:28 AM by caligae

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #21
Hi everybody,

Sourceforge has approved my project, so we can move the discussion over there. The (dreadfully empty as of yet) project page is at http://sourceforge.net/projects/abchr/. To subscribe to the discussion mailing list, go to http://lists.sourceforge.net/lists/listinf...nfo/abchr-users.

Thanks,

Carsten.

  • c_haese
  • [*][*]
  • Developer
ABC/HR Audio Comparison for GNU/Linux
Reply #22
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.

For release notes and download links, head on over to http://sourceforge.net/projects/abchr/.

Cheers,

Carsten.

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.

Edit: Typo fix
  • Last Edit: 08 October, 2003, 05:09:25 PM by c_haese