tapeutils
Interface SampleGenerator

All Known Implementing Classes:
ZX81SampleGenerator

public interface SampleGenerator

This interface provides operations to generate a sample from a .P file.

Author:
hldswrth

Method Summary
 void play(float frequency, boolean squareWave)
          Play the P file as a sample.
 void write(float frequency, boolean squareWave, java.io.File outputFile)
          Writes the P file to a sample file.
 

Method Detail

play

public void play(float frequency,
                 boolean squareWave)
          throws javax.sound.sampled.LineUnavailableException
Play the P file as a sample.

Parameters:
frequency - The frequency.
squareWave - Indicates whether to use a square wave.
Throws:
javax.sound.sampled.LineUnavailableException - An audio line could not be opened.

write

public void write(float frequency,
                  boolean squareWave,
                  java.io.File outputFile)
           throws java.io.IOException
Writes the P file to a sample file.

Parameters:
frequency - The frequency.
squareWave - Indicates whether to use a square wave.
outputFile - The output file.
Throws:
java.io.IOException - An error occurred writing to the file.