Yake - Community Forum
September 10, 2010, 08:48:04 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: News #1: If you're registration is rejected please report via E-Mail (--> www.yake.org for details).
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: audioOpenAL with yake trunk (rev 1964)  (Read 2328 times)
BartoloB
Newbie
*
Gender: Male
Posts: 18


View Profile
« on: March 02, 2009, 10:48:26 PM »

Hi,

I want to use OpenAL plugin because I don't like FMod licenses.
I remember a few years ago, I was glad to find FMOD and be able to quickly develop an alternative to audioOpenAL with my own audioFMOD plugin just because I wasn't clever enough to install OpenAL "driver" on Windows, but that's another story.

I recently had a battle to get sampleAudio_1 with audioOpenAL working again (last time I tried was, er... two years ago), and not only building.
I'm using yake SVN trunk and I build my own dependencies with Visual Studio 2008 Express, and here is my experience. Sorry it's only Windows specific, but it might help as building was my main issue.

1st attempt) I was using OpenThread 1.2dev2-osg0.9.5 sources, OpenAL 1.1 SDK and OpenAL++ sources to successfully build audioOpenAL, with these changes in openal++ code :
  • remove "(unsigned char *)" in audiobase.cpp line 37
  • replace "unsigned char" with "char" in audiobase.cpp lines 72
  • replace "ALubyte" with "const ALchar" in audiobase.cpp lines 73
  • replace "ALubyte" with "const ALchar" in audioenvironment.cpp lines 150 & 152
  • replace "YieldCurrentThread" with "Yield" in streamupdater.cpp line 150
         
Audio plugin and sample compiled but no sound, OpenAL state of audio source stuck at "Initial" after pSource->play().

2nd attempt) I tried OpenSceneGraph related sources of OpenThread and OpenAL++ : osgAL-0.6.1, osg-2.8.0 src+deps with cmake.
  • As domfada said, OSG is a huge dependency. But it is required only because "small" things for OpenThread are in OSG core (class Referenced mainly).
    To avoid building OSG, I just "extracted" the required code : with CMake I built only OpenThread from OSG sources as a static library, then I built oalpp from osgAL sources by defining OSG_LIBRARY (for static imports) and adding just these files (from osg core) : "ApplicationUsage.cpp, DeleteHandler.cpp, Notify.cpp & Referenced.cpp" to oalpp in the build process. I got less binaries, only OSG headers remain.
  • building audioOpenAL :
in yake\plugins\audioOpenAL\yakePCH.h, replace
Code:
#include <openalpp/alpp.h>
by
Code:
#include "openalpp/Export"
#include "openalpp/Source"
#include "openalpp/AudioEnvironment"
#include "openalpp/Listener"
#include "openalpp/GroupSource"
#include "openalpp/Sample"
#include "openalpp/FileStream"
in *edited*yake\plugins\audioOpenAL\yakeAudioSystemOpenAL.h*edited*, replace
Code:
openalpp::ref_ptr
with
Code:
osg::ref_ptr
and
Code:
openalpp::SourceBase
with
Code:
openalpp::Source
.
The lattest point took me time and debug sessions, only to figure out that openalpp::SourceBase::play() method is NOT virtual so some calls (loading audio data for streaming) were missing... I guess that's why my first attempt was a failure, but I don't want to spend more time on reading OpenAL++ sources.

I knowingly skipped some adjustments I needed in inlude paths and imported libs. If you need more details, feel free to ask Wink
« Last Edit: March 03, 2009, 06:35:15 PM by BartoloB » Logged
domfada
Newbie
*
Posts: 39


View Profile
« Reply #1 on: March 03, 2009, 02:40:11 AM »

The second file name you referenced for patching is the same as the first. I assume you meant "in yake\plugins\audioOpenAL\yakeAudioSystemOpenAL.h". However, I can find no reference to "openalpp::SourceBase" in it... Maybe it's been removed ? I'll try now.

[EDIT] works perfectly, thanks a LOT. I'll update the main thread.

[EDIT 2] Oh, and by the way, if the location in your profile is correct ("val de marne, France")... ben on est voisins Smiley
« Last Edit: March 03, 2009, 04:13:33 AM by domfada » Logged
BartoloB
Newbie
*
Gender: Male
Posts: 18


View Profile
« Reply #2 on: March 03, 2009, 06:40:10 PM »

You're right, wrong copy/paste.
Previous post corrected.

PS : Salut voisin !
Logged
domfada
Newbie
*
Posts: 39


View Profile
« Reply #3 on: March 03, 2009, 11:57:29 PM »

[EDIT]Disregard this post, I'm wrong[/EDIT]
Something I didn't make clear in my previous post : as of yake 0.8 beta, there is no "openalpp::SourceBase" to replace with "openalpp::Source" in yake\plugins\audioOpenAL\yakeAudioSystemOpenAL.h. "openalpp::ref_ptr" replacement is still needed, though.

PS : shhh... don't speak french, or they'll notice we're planning a yake takeover in the name of zee Republique !
« Last Edit: March 09, 2009, 12:25:39 AM by domfada » Logged
vimes
Newbie
*
Gender: Male
Posts: 25



View Profile WWW
« Reply #4 on: March 04, 2009, 09:45:41 PM »

Sorry for the spam but,
psssss, on est bien plus nombreux que ce que vous croyez. Au moins 3 en tout cas.
Logged
BartoloB
Newbie
*
Gender: Male
Posts: 18


View Profile
« Reply #5 on: March 05, 2009, 12:20:40 AM »

@domfada
I don't understand what you call "yake 0.8 beta", as it's in svn trunk since rev 1906 (almost 15 months ago).
What about line 113 there : http://yake.svn.sourceforge.net/viewvc/yake/trunk/yake/yake/plugins/audioOpenAL/yakeAudioSystemOpenAL.h?view=markup ?

Have I missed something ? [or have you ?]
Logged
domfada
Newbie
*
Posts: 39


View Profile
« Reply #6 on: March 09, 2009, 12:27:23 AM »

@vimes
Verri goude, aļ sii zi conspirasione is reunning wail !

@BartoloB
My mistake, lucky you double-checked... Must've fumbled with CTRL-F. I'll correct that line with your suggestions.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.125 seconds with 18 queries.