A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Julio Jerez » Fri Nov 09, 2012 9:09 am
what decent sound library is free to use for linux systems?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by FSA » Fri Nov 09, 2012 10:19 am
OpenAL I guess.
-

FSA
-
- Posts: 322
- Joined: Wed Dec 21, 2011 9:47 am
by Julio Jerez » Fri Nov 09, 2012 10:24 am
Yes I thonk I will go wit that.
Long time ago I try to get OpenAL SDK but I though it vanish, I down no get the SDK from the site, by nwo I see there is a open source group that distribute an open source package
http://kcat.strangesoft.net/openal.htmlI am migration to that
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by belfegor » Sun Nov 11, 2012 8:05 am
You could also use SMFL sound system, witch uses OpenAL. Its prety easy to integrate into demos and it is multiplatform.
http://www.sfml-dev.org/index.php- Code: Select all
#include <SFML\Audio.hpp>
...
sf::Listener sndListener;
sf::SoundBuffer sndBuffer;
sf::Sound snd;
...
sndBuffer.loadFromFile("barrel_hit.ogg"));
snd.setBuffer(sndBuffer);
snd.setLoop(false);
...
void loop()
{
sndListener.setPosition(cam.pos.x, cam.pos.y, cam.pos.z);
sndListener.setDirection(cam.dir.x, cam.dir.y, cam.dir.z);
}
void ContactProcess (const NewtonJoint* contactJoint, dFloat timestep, int threadIndex)
{
....
if(bestSound.getStatus() != sf::SoundSource::Playing)
{
bestSound.setPosition(contactPos.x, contactPos.y, contactPos.z);
bestSound.play();
}
...
}
-

belfegor
-
- Posts: 53
- Joined: Mon Sep 18, 2006 4:42 pm
- Location: Serbia
by Julio Jerez » Sun Nov 11, 2012 9:02 am
Too late, I already integrated openAL, which is opensource and for what I can see in very nice,
not all the mombo jumbo evens, callback and update that do not really work in fmod
open AL, is low lever and almost ideatical to openGL, I am loving it.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 1 guest