ads.audio
Class AudioTrack
java.lang.Object
|
+--ads.AbstractTrack
|
+--ads.audio.AudioTrack
- All Implemented Interfaces:
- java.awt.event.ActionListener, ControlContext, java.util.EventListener
- public class AudioTrack
- extends AbstractTrack
- implements java.awt.event.ActionListener, ControlContext
This is the class that handles the capture, playback, and waveform display
of audio data. A vector of these objects is created in MainFrame class;
one for each audio track.
Methods inherited from class ads.AbstractTrack |
getDeviceName, getFileName, getInputDeviceNumber, getLength, getName, getOutputDeviceNumber, getPosition, getTrackNumber, isAudioBoolean, isLoopBoolean, isMidiBoolean, isMute, isPlay, isRecord, isSolo, setAudioBoolean, setDeviceName, setFileName, setInputDeviceNumber, setLength, setLoopBoolean, setMidiBoolean, setMute, setName, setOutputDeviceNumber, setPlay, setPosition, setRecord, setSolo, setTrackNumber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
capture
public AudioTrack.Capture capture
playback
public AudioTrack.Playback playback
samplingGraph
public AudioTrack.SamplingGraph samplingGraph
AudioTrack
public AudioTrack()
open
public void open()
- Specified by:
open
in interface ControlContext
close
public void close()
- Specified by:
close
in interface ControlContext
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
load
public void load()
createAudioInputStream
public void createAudioInputStream(java.io.File file,
boolean updateComponents)
saveToFile
public void saveToFile(java.lang.String name,
javax.sound.sampled.AudioFileFormat.Type fileType)
setGain
public void setGain(int gain)
- Description copied from class:
AbstractTrack
- Sets the gain for this track. This is called by the setVol(int val)method
of the selected Channel object of the Mixer object.
- Overrides:
setGain
in class AbstractTrack