import net.beadsproject.beads.data.Sample;

/**
 * A utility that converts MP3 to AIF.
 * Demonstrates some functionality of Sample.
 * @author ben
 */
public class MP3ToAIF {

	public static void main(String[] args)
	{		
		String directory = "audio/";
		String mp3file = "gammaBrosTheme.mp3";
		String outputfile = mp3file + ".aif";
		
		try {
			System.out.println("Loading .mp3");
			Sample mp3 = new Sample(directory + mp3file);
			System.out.println("Writing to .aif");
			mp3.write(directory + outputfile);
			System.out.println("All done.");
		} catch (Exception e) {
			System.out.println("An error occurred! You may need to increase the heap space available.");
			e.printStackTrace();
		}		
	}
}
