private static void PlaySongs(bool[] settings) { MidiOutCaps myCaps = new MidiOutCaps(); int handle = 0; int deviceNumber = 0; midiOutGetDevCaps(0, ref myCaps, (uint)Marshal.SizeOf(myCaps)); midiOutOpen(ref handle, deviceNumber, null, 0, 0); int choice; do { choice = UIGeneric.UI("Select a song", typeof(Songs), ConsoleColor.DarkRed, ConsoleColor.White, ConsoleColor.Cyan); if (choice != (int)Songs.Exit) { Note[,] note; string[] arr = PlayTheNotes(choice, out note); if (choice == 5) { NoteIntepereter(handle, PianoString(arr, true, 3), settings[(int)Settings.DisplayNotes - (int)Settings.DisplayNotes]); } else { PlayNote(note, handle, settings[(int)Settings.DisplayNotes - (int)Settings.DisplayNotes]); } Console.WriteLine("Press a button to continue... "); Console.ReadKey(true); } } while (choice != (int)Songs.Exit); midiOutClose(handle); }
private static extern int midiOutGetDevCaps(int uDeviceID, ref MidiOutCaps lpMidiOutCaps, uint cbMidiOutCaps);