public SoundShaderTest() { sound = SoundBuffer.Load("Assets/Panacea.ogg"); instance = sound.Play(true); program = new SoundVisualizerShaderProgram(sound.Buffer.ToArray(), Window.Size); program.Origin = Window.Center + (0, 50); }
static void gameStart() { GRaff.Graphics.BlendMode.Current = GRaff.Graphics.BlendMode.Additive; shockwave = SoundBuffer.Load("Assets/Chargeup.wav"); GlobalEvent.ExitOnEscape = true; Instance.Create(new Background { Color = Colors.Black }); var snd = shockwave.Play(false); Async.Run(() => snd.Destroy()); GlobalEvent.BeginStep += () => { Global.Time++; //Global.Time = Mouse.X / 10; Window.Title = Global.Time.ToString(); }; GlobalEvent.KeyPressed += key => { if (key == Key.R) { Console.Clear(); Instance <StraightTrack> .Do(t => t.Destroy()); Instance <CircularTrack> .Do(t => t.Destroy()); simulateEvent(); shockwave.Play(false); } else if (key == Key.P) { } }; }
public SoundTest() { //instance = SoundBuffer.Stream(@"Assets/Panacea.wav"); buffer = SoundBuffer.Load(@"Assets/Panacea.wav"); //buffer = WaveGenerator.Generate(WaveGenerator.Binary(440), TimeSpan.FromSeconds(1)); }