From 6a69687ea1e4eabb2a232ba3a309a416ef93a5e6 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Thu, 1 Sep 2005 21:19:07 +0000 Subject: (svn r2904) Stupid editors, and renaming files with the same name just different casing is not really possible, so here comes another commit --- os/macosx/1openttdmidi.java | 55 +++++++++++++++++++++++++++++++++++++++++++++ os/macosx/openttdmidi.java | 55 --------------------------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 os/macosx/1openttdmidi.java delete mode 100644 os/macosx/openttdmidi.java (limited to 'os/macosx') diff --git a/os/macosx/1openttdmidi.java b/os/macosx/1openttdmidi.java new file mode 100644 index 000000000..fc4e0b5b8 --- /dev/null +++ b/os/macosx/1openttdmidi.java @@ -0,0 +1,55 @@ +// +// OpenTTDMidi.java +// OpenTTDMidi +// +// Created by Joshua King on Sun Apr 25 2004. +// Copyright (c) 2004 __MyCompanyName__. All rights reserved. +// +import java.io.*; +import java.util.*; +import javax.sound.midi.*; + +public class OpenTTDMidi { + + public static void main (String args[]) { + // Currently command line is the MIDI file + if (args.length == 1) { + Sequencer s2 = null; + + try { + s2 = MidiSystem.getSequencer(); + s2.open(); + } catch (MidiUnavailableException mue) { + System.exit(1); + } + + Sequence s = null; + + try { + s = MidiSystem.getSequence(new File(args[0])); + } catch (InvalidMidiDataException imde) { + System.exit(2); + } catch (IOException ioe) { + System.exit(3); + } + + try { + s2.setSequence(s); + s2.setMicrosecondPosition(0); + s2.start(); + for (long l = 0; l < (s.getMicrosecondLength() / 1000000); l++) { + try { + //System.out.print("."); + Thread.currentThread().sleep(1000); + } catch (InterruptedException ie) {} + } + System.out.println(); + } catch (InvalidMidiDataException imde) { + } + + s2.stop(); + s2.close(); + System.exit(0); + } + } +} diff --git a/os/macosx/openttdmidi.java b/os/macosx/openttdmidi.java deleted file mode 100644 index fc4e0b5b8..000000000 --- a/os/macosx/openttdmidi.java +++ /dev/null @@ -1,55 +0,0 @@ -// -// OpenTTDMidi.java -// OpenTTDMidi -// -// Created by Joshua King on Sun Apr 25 2004. -// Copyright (c) 2004 __MyCompanyName__. All rights reserved. -// -import java.io.*; -import java.util.*; -import javax.sound.midi.*; - -public class OpenTTDMidi { - - public static void main (String args[]) { - // Currently command line is the MIDI file - if (args.length == 1) { - Sequencer s2 = null; - - try { - s2 = MidiSystem.getSequencer(); - s2.open(); - } catch (MidiUnavailableException mue) { - System.exit(1); - } - - Sequence s = null; - - try { - s = MidiSystem.getSequence(new File(args[0])); - } catch (InvalidMidiDataException imde) { - System.exit(2); - } catch (IOException ioe) { - System.exit(3); - } - - try { - s2.setSequence(s); - s2.setMicrosecondPosition(0); - s2.start(); - for (long l = 0; l < (s.getMicrosecondLength() / 1000000); l++) { - try { - //System.out.print("."); - Thread.currentThread().sleep(1000); - } catch (InterruptedException ie) {} - } - System.out.println(); - } catch (InvalidMidiDataException imde) { - } - - s2.stop(); - s2.close(); - System.exit(0); - } - } -} -- cgit v1.2.3-70-g09d2