IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
ABC/HR Audio Comparison for GNU/Linux, version 0.2, now with 70% less suck than version 0.1
c_haese
post Oct 5 2003, 06:38
Post #1


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



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.

This post has been edited by c_haese: Oct 8 2003, 16:09
Go to the top of the page
+Quote Post
JohnV
post Oct 5 2003, 06:44
Post #2





Group: Developer
Posts: 2797
Joined: 22-September 01
Member No.: 6



Thanks Carsten. smile.gif


--------------------
Juha Laaksonheimo
Go to the top of the page
+Quote Post
danchr
post Oct 5 2003, 09:58
Post #3





Group: Members
Posts: 487
Joined: 6-April 03
From: Århus, Denmark
Member No.: 5861



QUOTE (c_haese @ Oct 5 2003, 07:38 AM)
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 smile.gif
Go to the top of the page
+Quote Post
AstralStorm
post Oct 5 2003, 12:25
Post #4





Group: Members
Posts: 745
Joined: 22-April 03
From: /dev/null
Member No.: 6130



CODE
<delete-me>
 <reason>
     I'm wrong again.
 </reason>
</delete-me>


This post has been edited by AstralStorm: Oct 5 2003, 12:31


--------------------
ruxvilti'a
Go to the top of the page
+Quote Post
danchr
post Oct 5 2003, 14:02
Post #5





Group: Members
Posts: 487
Joined: 6-April 03
From: Århus, Denmark
Member No.: 5861



After hacking some Makefiles, etc., I got it to compile, only to end up with this:
CODE
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.
Go to the top of the page
+Quote Post
Slo Mo Snail
post Oct 5 2003, 15:48
Post #6





Group: Members
Posts: 111
Joined: 2-July 02
From: Germany
Member No.: 2450



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
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


This post has been edited by Slo Mo Snail: Oct 5 2003, 15:50
Go to the top of the page
+Quote Post
danchr
post Oct 5 2003, 17:05
Post #7





Group: Members
Posts: 487
Joined: 6-April 03
From: Århus, Denmark
Member No.: 5861



QUOTE (Slo Mo Snail @ Oct 5 2003, 04:48 PM)
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.
Go to the top of the page
+Quote Post
caligae
post Oct 5 2003, 17:25
Post #8





Group: Members
Posts: 186
Joined: 23-January 02
Member No.: 1132



QUOTE (Slo Mo Snail @ Oct 5 2003, 04:48 PM)
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.
Go to the top of the page
+Quote Post
danchr
post Oct 5 2003, 18:28
Post #9





Group: Members
Posts: 487
Joined: 6-April 03
From: Århus, Denmark
Member No.: 5861



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?
Go to the top of the page
+Quote Post
c_haese
post Oct 6 2003, 13:13
Post #10


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



QUOTE (Slo Mo Snail @ Oct 5 2003, 09:48 AM)
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
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.
Go to the top of the page
+Quote Post
c_haese
post Oct 6 2003, 13:49
Post #11


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



QUOTE (danchr @ Oct 5 2003, 12:28 PM)
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.
Go to the top of the page
+Quote Post
c_haese
post Oct 6 2003, 13:54
Post #12


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



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 smile.gif

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.
Go to the top of the page
+Quote Post
Slo Mo Snail
post Oct 6 2003, 13:59
Post #13





Group: Members
Posts: 111
Joined: 2-July 02
From: Germany
Member No.: 2450



QUOTE (c_haese @ Oct 6 2003, 02:13 PM)
QUOTE (Slo Mo Snail @ Oct 5 2003, 09:48 AM)
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
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 smile.gif
Go to the top of the page
+Quote Post
Slo Mo Snail
post Oct 6 2003, 14:04
Post #14





Group: Members
Posts: 111
Joined: 2-July 02
From: Germany
Member No.: 2450



When starting and closing abchr without doing anything it segfaults (last lines of a ltrace) with

CODE
_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) +++
Go to the top of the page
+Quote Post
c_haese
post Oct 6 2003, 14:15
Post #15


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



QUOTE (Slo Mo Snail @ Oct 6 2003, 08:04 AM)
When starting and closing abchr without doing anything it segfaults (last lines of a ltrace) with

CODE
_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 smile.gif

Best regards,

Carsten.
Go to the top of the page
+Quote Post
Slo Mo Snail
post Oct 6 2003, 14:30
Post #16





Group: Members
Posts: 111
Joined: 2-July 02
From: Germany
Member No.: 2450



You have mail wink.gif
Go to the top of the page
+Quote Post
danchr
post Oct 6 2003, 16:44
Post #17





Group: Members
Posts: 487
Joined: 6-April 03
From: Århus, Denmark
Member No.: 5861



Concerning SDL_audio...

Another alternative is to use a slightly simpler API, such as Portaudio or your (as in Xiph) own ao smile.gif 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.

This post has been edited by danchr: Oct 6 2003, 16:47
Go to the top of the page
+Quote Post
c_haese
post Oct 6 2003, 17:57
Post #18


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



QUOTE (danchr @ Oct 6 2003, 10:44 AM)
Concerning SDL_audio...

Another alternative is to use a slightly simpler API, such as Portaudio or your (as in Xiph) own ao smile.gif 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 wink.gif ). 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?
Go to the top of the page
+Quote Post
caligae
post Oct 7 2003, 08:16
Post #19





Group: Members
Posts: 186
Joined: 23-January 02
Member No.: 1132



QUOTE (c_haese @ Oct 6 2003, 02:13 PM)
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.
Go to the top of the page
+Quote Post
c_haese
post Oct 7 2003, 13:26
Post #20


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



QUOTE (caligae @ Oct 7 2003, 02:16 AM)
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.
Go to the top of the page
+Quote Post
caligae
post Oct 7 2003, 14:11
Post #21





Group: Members
Posts: 186
Joined: 23-January 02
Member No.: 1132



QUOTE (c_haese @ Oct 7 2003, 02:26 PM)
QUOTE (caligae @ Oct 7 2003, 02:16 AM)
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

This post has been edited by caligae: Oct 7 2003, 14:21
Go to the top of the page
+Quote Post
c_haese
post Oct 7 2003, 16:14
Post #22


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



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.
Go to the top of the page
+Quote Post
c_haese
post Oct 8 2003, 22:07
Post #23


Xiph.org Ogg Traffic editor


Group: Developer
Posts: 72
Joined: 7-July 02
Member No.: 2500



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 smile.gif ). 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

This post has been edited by c_haese: Oct 8 2003, 22:09
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd September 2014 - 20:29