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 }