[gameprogrammer] World's easiest to use 3D sound engine

  • From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Fri, 2 Jul 2004 17:27:27 -0700

Seems like there is a lack of an easy to use 3D sound engine like I
described earlier so here is my version.  It wraps OpenAL.  You can get it
from http://www.rakkar.org/Sound3D.zip (100K)


#include "Sound3D.h"

// For Sleep just so it delays so you can hear the sound.
#include <windows.h>

int main(void)
{
 Sound3D mySound;
 mySound.InitializeSoundSystem();

 //load up our water sound
 mySound.LoadSound("chimes.wav",1);

 //set the position of the sound effect
 mySound.SetProperties(8.5f,0.0f,15.0f,0.0f,0.0f,0.0f);

 //set the initial listener position
 mySound.SetListenerPosition(0.0f,0.0f,0.0f);

 mySound.Play();

 Sleep(2000);

 //destroy our sound
 mySound.DestroySound();

 mySound.UninitializeSoundSystem();

 return 0;
}



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts:

  • » [gameprogrammer] World's easiest to use 3D sound engine