[Bf-committers] No Sound in BGE on OSX, Can someone update dep's?

Brecht Van Lommel brecht at blender.org
Sun May 3 21:40:08 CEST 2009


Hi,

I've attached a patch to use a WAV loading function that was already in
SND_OpenALDevice.cpp. This isn't ideal because this function probably
doesn't read some types of WAV files properly, but it's what I tried to
get working for Apricot after failing to get ALUT to work, and it means
there is no ALUT dependency at all.

Unfortunately even with that somehow sound did not work on the computer
I was testing at that time. Still it may be useful, if someone can
confirm it works or not, I don't have an Intel Mac to test. It works on
Linux and PPC Mac for me.

Getting ALUT to work or using a library like Alure I think is better in
the end, my patch is just a backup solution.

Btw, the patch that was linked to here using SDL to load the WAV file
will crash on loading packed sound files, because when reading from
memory it passes the memory pointer rather than a file name to SDL. From
looking at the SDL API, loading an WAV file from memory doesn't seem to
be supported unfortunately.

Brecht.

On Sun, 2009-05-03 at 04:11 -0700, Campbell Barton wrote:
> right, its not a release target but its a shame theres no sound support on OSX.
> If this could be fixed why not include in 2.49?
> 
> On Sun, May 3, 2009 at 3:51 AM, Ton Roosendaal <ton at blender.org> wrote:
> > Hi,
> >
> > Note that we've released intel osx versions always without sound, it
> > has a warning for it on the download page.
> > Unless the platform maintainer (with help?) can get it to work
> > reliably, we could skip it as release target. It's really a development
> > topic?
> >
> > -Ton-
> >
> > ------------------------------------------------------------------------
> > Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
> > Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands
> >
> > On 2 May, 2009, at 5:39, Campbell Barton wrote:
> >
> >> Thanks for the patch, It looks like alut is only used for WAV loading
> >> in blender.
> >> Since alut seems to be less well supported then OpenAL maybe we could
> >> use SDL on all systems?
> >> (then we have one less dependency too)
> >>
> >> On mac there is OpenAL support, on windows and linux there is
> >> OpenAL-Soft which is actively maintained, but for alut there is
> >> freealut from creative which is not supported by apple, alure is
> >> actively maintained but not a drop in replacement for alut (but very
> >> similar).
> >>
> >> It seems to me your current patch should solve the problem with the
> >> least hassle.
> >> Switching to alure could be good longer term but for 2.49 we really
> >> should have the game engine sound working on OSX and it seems to close
> >> to release to switch libs???.
> >>
> >> Any OSX users able to test this patch?
> >>
> >> - Campbell
> >>
> >> On Fri, May 1, 2009 at 8:16 PM, Jorge Bernal
> >> <jbernalmartinez at gmail.com> wrote:
> >>> Hi Campbell,
> >>>
> >>> you're right. In the apple Q&A:
> >>> http://developer.apple.com/qa/qa2006/qa1504.html
> >>>
> >>> "The header file 'alut.h' is missing from the OpenAL framework.
> >>>
> >>> Q: Why does the compiler complain that the header file can't be found?
> >>> A: As of Mac OS X 10.4.7, the OpenAL framework has been updated to
> >>> version 1.1 of the OpenAL specification. The OpenAL framework now
> >>> strictly conforms to the OpenAL specification and since ALUT is not an
> >>> official part of the specification it will no longer be included as
> >>> part of the OpenAL framework. The ALUT header files were removed as of
> >>> the Xcode 2.4 update."
> >>>
> >>> To attemp to fix this problem I have uploaded a patch here:
> >>> http://jbernalmartinez.googlepages.com/MacOSX-openal.patch
> >>> I haven't used alut functions for Apple (I have used SDL wav loader).
> >>>
> >>> This one is a temporal solution (if it works because I haven't proved
> >>> it :-) ). In the next weeks I will upload a patch using alure library
> >>> in lieu of alut "mess" library. It should unify openal (init, exit,
> >>> loader, etc) for win, linux, mac platforms.
> >>>
> >>> regards,
> >>> lordloki
> >>>
> >>>
> >>> 2009/5/1 Campbell Barton <ideasman42 at gmail.com>
> >>>>
> >>>> According to Chris (the openal-soft developer) OSX comes with openal
> >>>> support in its framework.
> >>>> the problem is that the alut OSX has is quite old, so we'd need to do
> >>>> some mac specific defines IIRC we alredy have mac defines here? maybe
> >>>> this is done.
> >>>>
> >>>> Otherwise if we want to use openal-soft with portaudio, on my linux
> >>>> system portaudio is 180k/68k compressed so not too bad a dep.
> >>>>
> >>>> Note - for static openal-soft use "set -DLIBTYPE=STATIC" with cmake,
> >>>> its not documented :|
> >>>>
> >>>> On Fri, May 1, 2009 at 3:33 AM, Jorge Bernal
> >>>> <jbernalmartinez at gmail.com> wrote:
> >>>>> Hi Campbell,
> >>>>>
> >>>>> At this moment Openal-soft only works in Mac OS X (intel & PPC)
> >>>>> through
> >>>>> PortAudio library. To avoid install another new library with
> >>>>> blender,
> >>>>> several month ago in the GIT repository of Openal-Soft there was a
> >>>>> SDL
> >>>>> backend:
> >>>>> http://repo.or.cz/w/openal-soft.git?a=commit;
> >>>>> h=7ebb28327f8e5fb91e3b0808f2782bf2f2e15341
> >>>>>
> >>>>> This backend worked perfectly but it was removed due to compile
> >>>>> problems
> >>>>> (under some linux installations Cmake can't find SDL libraries).
> >>>>> Therefore, If we add again this backend with the last release of
> >>>>> Openal-soft
> >>>>> then we can avoid the Portaudio library requirement.
> >>>>>
> >>>>> I can supply an OpenAl-soft release with the SDL backend included
> >>>>> but
> >>>>> someone will have to compile it because I don't have a Mac.
> >>>>>
> >>>>> Regards,
> >>>>> lordloki
> >>>>>
> >>>>>
> >>>>>
> >>>>> 2009/5/1 Campbell Barton <ideasman42 at gmail.com>
> >>>>>
> >>>>>> Hi, some of the guys on blenderartist keep complaining that they
> >>>>>> cant
> >>>>>> get sound with the game engine on a mac (heres a the report)
> >>>>>> [#5821] No sound on OSX (Intel) version of Blender Game Engine
> >>>>>>
> >>>>>> http://projects.blender.org/tracker/index.php?
> >>>>>> func=detail&aid=5821&group_id=9&atid=306
> >>>>>>
> >>>>>> Could someone update the mac openal to openal-soft?, ubuntu  uses
> >>>>>> use
> >>>>>> openal-soft now and from what I read its supported on mac and
> >>>>>> windows.
> >>>>>> Would be nice to go over and update SDL too.
> >>>>>>
> >>>>>> Heres the commit log for mac's openal libs, it doesn't say anywhere
> >>>>>> what version they are or what source package was used.
> >>>>>> -------------------------------------------------------------------
> >>>>>> -----
> >>>>>> r10195 | halley | 2007-03-03 06:48:05 -0800 (Sat, 03 Mar 2007) |
> >>>>>> 11 lines
> >>>>>>
> >>>>>> Added headers and a precompiled library for OpenAL on Intel OSX.
> >>>>>>
> >>>>>> There are still *problems* with the functionality that OpenAL
> >>>>>> needs to
> >>>>>> fix for this platform.  Do not expect OpenAL sounds to work
> >>>>>> properly in
> >>>>>> the game engine, for example, and there may be some crasher bugs.
> >>>>>>
> >>>>>> However, this will simplify building and running blender on Intel
> >>>>>> OSX
> >>>>>> if you're not interested in using the OpenAL featuresOpenAL
> >>>>>> features.
> >>>>>> More progress will be made on the makefiles to use this library
> >>>>>> once it
> >>>>>> is less crash-prone.
> >>>>>> -------------------------------------------------------------------
> >>>>>> -----
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> - Campbell
> >>>>>> _______________________________________________
> >>>>>> Bf-committers mailing list
> >>>>>> Bf-committers at blender.org
> >>>>>> http://lists.blender.org/mailman/listinfo/bf-committers
> >>>>>>
> >>>>> _______________________________________________
> >>>>> Bf-committers mailing list
> >>>>> Bf-committers at blender.org
> >>>>> http://lists.blender.org/mailman/listinfo/bf-committers
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> - Campbell
> >>>> _______________________________________________
> >>>> Bf-committers mailing list
> >>>> Bf-committers at blender.org
> >>>> http://lists.blender.org/mailman/listinfo/bf-committers
> >>> _______________________________________________
> >>> Bf-committers mailing list
> >>> Bf-committers at blender.org
> >>> http://lists.blender.org/mailman/listinfo/bf-committers
> >>>
> >> _______________________________________________
> >> Bf-committers mailing list
> >> Bf-committers at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-committers
> >>
> >>
> >
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
> >
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snd_replace_alut.patch
Type: text/x-patch
Size: 8948 bytes
Desc: not available
Url : http://lists.blender.org/pipermail/bf-committers/attachments/20090503/f8725105/attachment.bin 


More information about the Bf-committers mailing list