bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Mac Builds and Sound on OS/X 10.6+ w/64Bit


From: Michael Petch
Subject: [Bug-gnubg] Mac Builds and Sound on OS/X 10.6+ w/64Bit
Date: Fri, 04 Mar 2011 15:47:30 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8

Howdy All,

While I was looking into other issues last night I decided to finally finish install Snow Leopard on my Mac. This is the first time I have had a chance in a year and a half to spend time on this platform.

-----------
Sound
-----------

A couple weeks ago I spent some time (without having Snow Leopard installed) trying to help people on the list try to build a 64 Bit variant of GNUBG on this platform. The fix effectively disabled QuickTime sound on the 64 Bit build. I didn't eliminate the sound code, just didn't compile QuickTime code in.

After doing a MacPorts based build (I ran into a few bumps outlined below) and ran GNUBG I discovered that one can still specify an external application to play sounds with. This feature can be set via the "Settings" menu / "Options" / "Sound" tab and "Sound command". The sound command is the full path and name to a program that can play a sound by specifying a single argument (the argument is the name of the file).

I originally tries canberra's canberra-gtk-play, and for some reason canberra sound on my Mac environment makes the player run out of memory when attempting to play anything. I decided to build a program from the Apple examples called PlayFile.cpp available here http://developer.apple.com/library/mac/#samplecode/PlayFile/Introduction/Intro.html .

I simply modified the sample code by commenting out the printf's that produce console output while playing the file (This keeps it from appearing in the GNUBG console). The resulting binary can be downloaded and extracted from my site: www.capp-sysware.com/downloads/PlayFile.tar .

Extract the tar file into a bin directory ( /opt/local/bin or /opt/bin etc ) . This archive only contains PlayFile . Now in GnuBG specify the full path (and file name) to PlayFile . Exit GnuBG and reload. In theory you should hear sound now.

Has anyone had any success with libcanberra on their systems? I tried to build 64-Bit GNUBG with canberra support, it compiles but sound doesn't work (Yes GTK_MODULES is set correctly, and an X session display is set). Even the supplied program canberra-gtk-play doesn't work properly. I haven't gone back and tried a 32 bit version yet. if canberra would work consistently on this platform we could consider removing Apple specific sound systems.

I will be looking at integrating PlayFile's code into GnuBG. The main issue is that PlayFile is an Apple Open License and also relies on a number of .cpp classes and headers (part of the Apple SDK) with the same license. It doesn't seem the license is entirely compatible with GPL so I'll attempt to rewrite an equivalent in C and have no reliance on Apple headers and class files. (.h AND .cpp).

For the moment the external player method may allow people to have 64bit GNUBG with sound.

-----------------------
Mac Ports Build
-----------------------

If people are using macPorts and find that changing languages doesn't seem to be anything but English - I had noticed that libintl.h was not being found during the ./configure process (I didn't investigate the reason fully but appears to be pkg-config related). My MacPorts build process is:

Pull file's from CVS
./autogen.sh
CPPFLAGS="-I/opt/local/include" ./configure --enable-threads --prefix=/opt
make
sudo make install

---------------
Autgen.sh
---------------

While I was at it, I put away a new autogen.sh to utilize glibtoolize instead of libtoolize *IF* building on the Apple(Darwin) platforms. This naming difference has been around for all the years I have been building GNUBG on OS/X through all variants of OS/X .

Michael






reply via email to

[Prev in Thread] Current Thread [Next in Thread]