//OpenALHelper sound; //bool playing = false; // This method is invoked when the application has loaded its UI and its ready to run public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window.MakeKeyAndVisible(); //create caf files with the following command line: afconvert -f caff -d LEI16@22050 -c 1 <in> <out> // this can handle any kind of caf files (I think) OpenALHelper sound = new OpenALHelper("sound2.caf"); sound.Loop = true; bool playing = false; btn.TouchUpInside += delegate { if (!playing) { sound.Play(); } else { sound.Stop(); } playing = !playing; }; sld.ValueChanged += delegate { AL.Source(sound.Source, ALSourcef.Pitch, sld.Value); }; return(true); }
//OpenALHelper sound; //bool playing = false; // This method is invoked when the application has loaded its UI and its ready to run public override bool FinishedLaunching(UIApplication app, NSDictionary options) { window.MakeKeyAndVisible (); //create caf files with the following command line: afconvert -f caff -d LEI16@22050 -c 1 <in> <out> // this can handle any kind of caf files (I think) OpenALHelper sound = new OpenALHelper("sound2.caf"); sound.Loop = true; bool playing = false; btn.TouchUpInside += delegate { if (!playing) sound.Play(); else sound.Stop(); playing = !playing; }; sld.ValueChanged += delegate { AL.Source(sound.Source, ALSourcef.Pitch, sld.Value); }; return true; }