static void Main(string[] args) { // start the sound engine with default parameters ISoundEngine engine = new ISoundEngine(); // create an instance of the file factory and let // irrKlang know about it. MyIrrKlangFileFactory myfactory = new MyIrrKlangFileFactory(); engine.AddFileFactory(myfactory); // that's it, play some sounds with our overriden // file access methods: // now play some sounds until user presses 'q' Console.Out.WriteLine("\nDemonstrating file access overriding."); Console.Out.WriteLine("Press any key to play some sound, press ESCAPE to quit."); _getch(); engine.Play2D("../../media/getout.ogg", true); do { // play some wave sound engine.Play2D("../../media/bell.wav"); } while(_getch() != 27); // user pressed eskape key to cancel }
static void Main(string[] args) { // start the sound engine with default parameters ISoundEngine engine = new ISoundEngine(); // create an instance of the file factory and let // irrKlang know about it. MyIrrKlangFileFactory myfactory = new MyIrrKlangFileFactory(); engine.AddFileFactory(myfactory); // that's it, play some sounds with our overriden // file access methods: // now play some sounds until user presses 'q' Console.Out.WriteLine("\nDemonstrating file access overriding."); Console.Out.WriteLine("Press any key to play some sound, press ESCAPE to quit."); _getch(); engine.Play2D("../../media/getout.ogg", true); do { // play some wave sound engine.Play2D("../../media/bell.wav"); }while(_getch() != 27); // user pressed eskape key to cancel }
public AudioIrrKlangSession(string filePath) { _soundFile = new SoundFile(filePath); _engine.AddFileFactory(_soundFile); _recorder = new IAudioRecorder(_engine); _path = filePath; //_irrklangEventProxy = new ProxyForIrrklangEvents(this); }
/// <summary> /// Constructor for an AudioSession using the IrrKlang library /// </summary> public AudioIrrKlangSession(string filePath) { Guard.AgainstNull(filePath, "filePath"); _soundFile = new SoundFile(filePath); _engine.AddFileFactory(_soundFile); _recorder = new IAudioRecorder(_engine); _path = filePath; }