public float millisecondsPlayed(String sourcename) {
		if (sourcename == null || sourcename.equals("")) {
			errorMessage("Sourcename not specified in method "
					+ "'millisecondsPlayed'");
			return -1;
		}

		if (midiSourcename(sourcename)) {
			errorMessage("Unable to calculate milliseconds for MIDI source.");
			return -1;
		} else {
			Source source = sourceMap.get(sourcename);
			if (source == null) {
				errorMessage("Source '" + sourcename + "' not found in "
						+ "method 'millisecondsPlayed'");
			}
			return source.millisecondsPlayed();
		}
	}