package at.fhtw.mcs;

import java.util.Scanner;

import at.fhtw.mcs.model.Track;
import at.fhtw.mcs.model.TrackFactory;

class Main {

	public static void main(String[] args) throws InterruptedException {
		String filename = args[0];
		System.out.println("Loading " + filename);
		Track track = TrackFactory.loadTrack(filename);
		track.play();

		try (Scanner scanner = new Scanner(System.in)) {
			while (true) {
				switch (scanner.nextLine()) {
					case "p":
						track.togglePlayPause();
						break;
					case "s":
						track.stop();
						break;
					case "q":
						return;
				}
			}
		}
	}
}

@@ -198,16 +198,97 @@
 ption %7B%0A
+%09%09if (args.length != 1) %7B%0A%09%09%09System.err.println(%22Usage: ./mcs AUDIO_FILE%22);%0A%09%09%7D%0A%0A
 %09%09String

Print usage if argument count != 1