Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I'm kinda new to programming (c sharp), and I'm confused about how to make an instance of ISound and the likes. I cant seem to find answers. http://www.ambiera.com/irrklang/docunet/index.html says i need to give it two arguments: ISound* nativeSound, ISoundEngine* nativeEngine I get the ISoundEngine, but how am I supposed to give it an ISound, when that's what I'm trying to make to begin with? |
||||
|
You don't create an ISound yourself, you get it back when you play a sound, using yourSoundEngine.Play2D(... or Play3D(... |
||||
|
I actually have the same quandary here. Ok, so ISound just makes use of ISoundEngine. But how to create an instance of ISound in C, to use the Stop() method rather than ISoundEngine's StopAllSounds()? The only example I've seen is ISound mySound = engine.Play2D(fileName, false); but that's not much use when trying to use mySound.Stop() out of context.... It's not like I can create an instance of ISound separately and pass it around? It's probably something simple, but I'm new to programming too, any help at all would be appreciated :-) |
||||
|
It's really not that difficult. Here you have your instance of ISound, it is stored in a variable named 'sound': ISound sound = engine.Play2D("someFilename.mp3"); Now, to stop that sound somewhere later, call stop to it: sound.Stop(); |
|