History: IrrKlang for MOGRE
Preview of version: 2
IrrKlang is a Sound library.
It has a stable .NET wrapper provided by the original developers. So it's usable with Mogre.
Examples and documentations are on the project website.
Forum quote:
There are a couple of references around on the forums and on the wiki that mention it can be used in C# which is basically the same thing as saying it can be used with Mogre.
License
IrrKlang is free for non-commercial use. For commercial use the license fee will be between 65€ (~$85) for low budged projects and up to 490€ (~$640).
Usage
2D Sound Example
Copy to clipboard
using System; using IrrKlang; namespace HelloWorld { class Example { [STAThread] static void Main(string[] args) { // start up the engine ISoundEngine engine = new ISoundEngine(); // play a sound file engine.play2D("../../media/ophelia.mp3"); // wait until user presses OK to end application System.Windows.Forms.MessageBox.Show("Playing, press ok."); } // end main() } // end class } // end namespace
3D Sound Example
Copy to clipboard
// initialise ISoundEngine soundEngine = new ISoundEngine(); soundEngine.SoundVolume = 1.0f; // set listener position (usually at the camera) Vector3 position = camera.Position; Vector3 direction = camera.Direction; soundEngine.SetListenerPosition(position.x, position.y, position.z, direction.x, direction.y, direction.z); // play a sound somewhere in the scene ISound sound = soundEngine.Play3D("test.wav", position.x, position.y, position.z); sound.MinDistance = 5; // distance that the sound plays at full volume
See also:
Alternatives: