Page 1 of 2

cAudio 2.1.0 Release!

Posted: Thu Mar 18, 2010 1:06 am
by wildrj
Image

The next version of cAudio has been released. cAudio is an advanced C++ wrapper around OpenAL that makes it easier to put 3D audio into your games and other applications. This version is mainly a bug fix release, but we did add some new features as well. We also redid how we made our SDK packages, now the full source is included with all of them, saving you the hassle of finding and downloading a separate source package. We did this due to the large number of compiler defines available to customize cAudio. We know our official SDKs are not perfect for every environment, so we wanted to make it easier for our users to customize it as necessary.

New Features:
  • New Memory System (allows for the user to override all memory allocations by cAudio, providing a custom allocation scheme if necessary)
  • New Memory Tracker (for finding memory leaks and tracking memory usage statistics)
  • Official Mac OS X and IPhone support
Major changes:
  • Removed old memory system due to numerous bugs.
  • Added a ogg vorbis close callback function to prevent a crash on Mac/IPhone
  • Reorganized cAudioDefines to order by platform.
  • Added defines to disable portions or all of the plugin system.
  • Added defines for finer control of what is compiled into the library.
  • Removed the ogg/vorbis encoding lib that was mistakenly linked in, which doubled the binary's size.
Official Web Site: http://caudio.deathtouchstudios.com/
Official Forums: http://www.deathtouchstudios.com/phpBB3/
SourceForge Project: http://sourceforge.net/projects/caudio/
API Documentation: http://caudio.deathtouchstudios.com/doc ... index.html
SVN Trunk: http://www.svn.deathtouchstudios.com/cAudio/Trunk

Windows (MSVC 2008 and Codeblocks), Linux (Make and Codeblocks), Mac OS X (XCode) and IPhone (XCode) SDK downloads are available.
Get them here: http://sourceforge.net/projects/caudio/files/

Thank you for your time and we hope that cAudio is useful to you. Remember, you can always drop us a line at our forums to ask questions, report bugs, or discuss with other developers.

Posted: Thu Mar 18, 2010 1:35 am
by pippy3
Great work! nice to see MacOS X and iPhone support

Posted: Sat Mar 20, 2010 7:09 am
by Ulf
Any chance of getting a MSVC2005 version of the project and solution files?

Posted: Sat Mar 20, 2010 5:32 pm
by wildrj
We have no plan to support vs2005 however in each "release" we supply you with the entire source and all the dependency's *precompiled*. So to create a project would be as simple has adding all the files in the source,headers, and include directory.. Then just linking the libs and headers inside the dependencies folder. Hit compile and your done . Hope this helped.

Posted: Sun Mar 21, 2010 4:22 pm
by freetimecoder
Hi,

Nice work! :)

But I have a question, how does setMin- and setMaxDistance work?
Because when I place the sound at 110,0,0 and set the maxDistance to 100 the sound is much quieter than it is when I set maxDistance to 2? Shouldn't it be the other way around? I used the Tutorial 2 3D Sound Code.

greetings

Posted: Sun Mar 21, 2010 9:15 pm
by wildrj
This is something that openal is really weird about.. that value is 0.0 - 1.0 and all the values in between are 0% - 100% so when you set it to 2.0 thats 200% that volume so explains why its so loud. Now when you set it to 100 you increased it x 100 the volume therefore that audio sources volume cone is much more narrow at the start therefore its much quieter.. *at least thats how much i understand of it i suspect if im wrong Dark_Kilauea will come around and clear it up*

But i believe thats the effect thats happening so hope that clears it up.

Posted: Mon Mar 22, 2010 8:09 am
by Ulf
wildrj wrote:So to create a project would be as simple has adding all the files in the source,headers, and include directory.. Then just linking the libs and headers inside the dependencies folder. Hit compile and your done . Hope this helped.
Yes thanks. I got it compiling.

Posted: Tue Mar 23, 2010 12:11 am
by Dark_Kilauea
The equation used for distance calculations is:

Code: Select all

volume = MinDist / (MinDist + RolloffFactor * (distance - MinDist));
MinDist being the value in setMinDistance, RolloffFactor being the value set in setRolloffFactor (default 1), and distance being how far away the source is from the listener. The volume is clamped by the setMaxDistance and setMinDistance values. So yes, a max distance of 2 will be louder, since the source is not allowed to continue to drop off past that point. Very strange, but that is the way OpenAL does it.

Posted: Tue Mar 30, 2010 1:28 pm
by 3DModelerMan
Does this output in Dolby 5.1 surround sound if your sound card supports it?

Posted: Tue Mar 30, 2010 5:44 pm
by freetimecoder
@Dark_Kilauea: Is there an error in the calculation? Or does OpenAl use a different function for maxDistance?

greetings

Posted: Tue Apr 06, 2010 8:09 pm
by Dark_Kilauea
@3DModelerMan I believe so, if your OpenAL implementation supports that.

@freetimecoder We are using the exact same function as OpenAL, we will probably change it later to be a little more user friendly, but it is exactly the same as if you entered the value into the OpenAL property for a source.

Posted: Wed Apr 07, 2010 6:23 am
by freetimecoder
No, I mean if the qouted function is wrong:
Dark_Kilauea wrote:The equation used for distance calculations is:

Code: Select all

volume = MinDist / (MinDist + RolloffFactor * (distance - MinDist));
It does not contain MaxDist, making it redundant.

greetings

Re: cAudio 2.1.0 Release!

Posted: Thu Sep 22, 2011 8:08 pm
by kevinsbro
I don't seem to understand. Whenever I play a sound effect it appears to get loaded into memory every time. Is there a way to have multiple sources share the same buffer data?

Re: cAudio 2.1.0 Release!

Posted: Thu Dec 15, 2011 12:49 pm
by RdR
I seem to have problems using the sound->setMaxDistance(), it doenst affect the sound attenuation at all.

Updating listener:

Code: Select all

 
//Get the listener position and direction from the values of our current camera
const core::vector3df direction = view->getCurrentCamera()->getAbsolutePosition() - view->getCurrentCamera()->getTarget();
const core::vector3df position = view->getCurrentCamera()->getAbsolutePosition();
 
//Set position, velocity and orientation information on the listener
cAudio::IListener* listener = soundManager->getListener();
listener->move(irrlichtToCAudioVector(position));
listener->setDirection(irrlichtToCAudioVector(direction));
 
Adding some sound

Code: Select all

 
cAudio::IAudioSource* sound = soundManager->create(filename, filename);
sound->setVolume(soundVolume);
sound->setMinDistance(30.f);
sound->setMaxDistance(100.f);
 
cAudio::cVector3 position = irrlichtToCAudioVector(getAbsolutePosition());
sound->setPosition(position);
sound->play3d(position, sound->getStrength(), sound->isLooping());
 

Re: cAudio 2.1.0 Release!

Posted: Tue Dec 20, 2011 1:25 pm
by RdR
Bump! Anyone got a solution for my problem?