FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: 1 [2]

Author Topic: Audio module redesign  (Read 16671 times)

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #15 on: February 18, 2008, 03:18:18 am »

specify to previoгs post:

create directory "trunk/ext/openal-soft/" and copy openal-soft sources and create install script for easy install this library.
weight of sources - 492kb, or 65,6 in tar.bz2
periodically update this library in our svn.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #16 on: February 18, 2008, 03:29:41 am »

Sounds like a good solution to me sja :-)

While OpenAL-soft seems to resolve a couple of problems for the Linux users it hasn't been added to any important package repositories. So I would support this proposal, putting OpenAL-soft into ext. Any volunteers to test this and make the neccessary changes to SVN after that?
Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #17 on: March 11, 2008, 09:25:08 am »

I'm currently trying to get stereo support for FIFE under Linux. To do so I'm trying to add openal-soft (http://kcat.strangesoft.net/openal.html) to the ext directory in our SVN repository.

Openal-soft uses cmake as build system. We would need to port parts of the cmake script to scons if we want to offer support for building it from our SVN without forcing the user to install cmake. I'm currently trying to create a configure.sh script that checks the host system for a number of different libraries (e.g. OSS, ALSA) and creates a correct config.h that is used by openal-soft after that.

I'm having some problems with this however:
1. I've found no option to check if INT64 is defined on the system via configure.in (I'm using autoconf)
2. Checking if two different funtions exist in one library does not work correctly yet.

Could anyone help me out with this?

EDIT mvbarracuda: clarification.
« Last Edit: March 11, 2008, 10:11:43 am by mvBarracuda »
Logged

Joshdan

  • Developer
  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Audio module redesign
« Reply #18 on: March 11, 2008, 11:07:21 pm »

regarding point #1, I believe the only supported compiler that does not include these definitions is MSVC, so you could just check for that.  This method is used in our header files, so if the assumption proves false, more than OpenAL-Soft would fail anyway.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #19 on: March 12, 2008, 03:12:13 pm »

Hmm I guess we won't need to worry about MSVC support anyway as openal-soft is just planned as alternative for NIX systems. OpenAL works quite fine on win32 so there is no need to switch to openal-soft on this platform.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #20 on: March 19, 2008, 07:56:58 am »

Copy & paste:
The initial idea was to add OpenAL-soft to our ext directory in SVN so linux users could build it via scons ext=1. However openal-soft seems to rely on a file called config.h that gets generated by cmake (the native build system that openal-soft uses). We would need to port parts of the cmake script to scons in case we would like to implement the ext directory solution.

Another alternative would be to simply add a note to the wiki that openal-soft could / should be used instead of the normal openal package. In this case we would leave the library decision to the user.

Both approaches offer advantages and disadvantages:
- The ext approach would make it easy for users to install openal-soft and they won't need cmake for this purpose. The main disadvantage is that we would need to update our scons script in case we would like to add newer openal-soft releases later that come with a modified cmake script.
- The approach to leave the decision to the user offers the advantage that we wouldn't need to take care of openal-soft integration. The main disadvantage is that users are forced to install cmake if they would like to use openal-soft.

What do you think about these two approaches? Do you have any preference? Would be good to have some feedback by our Linux-based developers. Win32 users would stick to the normal OpenAL sample implementation that comes with the win32 compile SDK as OpenAL support by Creative seems to be better on this platform.
Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #21 on: March 20, 2008, 03:01:11 am »

i am creating configure file special for getting info about user system and correct compile openal-soft.
if some libs or dev packets dont installed - user needed in manual installing this packets (it is inevitable, e.g. installing sdl and others library).
Now we nedded in testing...
Good luck!
Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #22 on: March 21, 2008, 04:15:04 am »

Mini HOW TO for testing openal-soft in FIFE

1. Download from FIFE ftp, dirctory sja file openalsoft.tar.bz2 and unpack;
2. Copy subdir openal-soft to trunk/ext/;
3. Replace trunk/ext/Sconscript to SConscript (from tar.bz2);
4. Replace trunk/SConstruct to SConstruct;
5. Replace trunk/build/linux2-config-dist.py to linux2-config-dist.py;
6. Replace in trunk/engine/core/audio/fifeopnal.h:
Code: [Select]
#if defined( __unix__ )
#include <AL/al.h>
#include <AL/alc.h>
#endif
to
Code: [Select]
#if defined( __unix__ )
#include "AL/al.h"
#include "AL/alc.h"
#endif
7. Use standart
Code: [Select]
scons -c
scons ext=1 (see for no errors)
scons

good luck!
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Audio module redesign
« Reply #23 on: April 11, 2008, 02:39:02 am »

Did any linux-based developer try this yet? If so: how did it work out? It would be great if we could add openal-soft to trunk and the datasets branch soon.
Logged

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #24 on: April 15, 2008, 03:51:41 am »

hey all! please test it!
checkout from https://svn1.cvsdude.com/fife/engine/branches/active/openal-soft

one trouble: - library openal_soft dont finded CheckSimplyLib (in SConstruct), for test im forced ret=1 for finded and link this lib :)
and scons ext=1 && scons.

testing, and who possible - corrected this search of lib, please.

stereo rulez :-D
Logged

ashen

  • Newbie
  • Posts: 3
  • Mess with the best, die like the rest
    • View Profile
Re: Audio module redesign
« Reply #25 on: April 20, 2008, 03:49:23 am »

Works here
I don't even have problem with CheckSimplyLib

hey all! please test it!
checkout from https://svn1.cvsdude.com/fife/engine/branches/active/openal-soft

one trouble: - library openal_soft dont finded CheckSimplyLib (in SConstruct), for test im forced ret=1 for finded and link this lib :)
and scons ext=1 && scons.

testing, and who possible - corrected this search of lib, please.

stereo rulez :-D
Logged
“He is able who thinks he is able.”

sja

  • Newbie
  • Posts: 8
    • View Profile
Re: Audio module redesign
« Reply #26 on: April 20, 2008, 06:22:26 am »

please, checkout from https://svn1.cvsdude.com/fife/engine/branches/active/openal-soft
and run: scons ext=1 && scons
and : cd clients/island_demo
python run_demo.py

all works. i'm excluding support oss from library openal-soft.
i'm changing music in island_demo to ZXSpectrum music (Andy Fer) for really testing stereo effect.
Logged
Pages: 1 [2]