|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.co.javagear.SN76496
public final class SN76496
Texas SN76496 Emulation.
| Field Summary | |
|---|---|
private javax.sound.sampled.AudioFormat |
audioFormat
Specifies the arrangement of sound data. |
private byte[] |
buffer
Buffer for sound data. |
private ToneGenerator |
chan0
Tone Generator 1. |
private ToneGenerator |
chan1
Tone Generator 2. |
private ToneGenerator |
chan2
Tone Generator 3. |
private NoiseGenerator |
chan3
Noise Generator. |
private double |
clockSpeed
PSG Clock Speed. |
private ToneGenerator |
currentGenerator
Pointer to current Tone Generator. |
private boolean |
enabled
Sound Enabled. |
private java.io.FileWriter |
fileWriter
For Recording Sound to Disk. |
private javax.sound.sampled.SourceDataLine |
line
The line that transmits audio to speakers. |
private boolean |
recording
Record Sound to Disk. |
private int |
sampleRate
Output Sample Rate. |
private int |
samplesPerFrame
Samples to Generate per video frame. |
| Constructor Summary | |
|---|---|
SN76496(double c,
int s)
SN76496 Constructor. |
|
| Method Summary | |
|---|---|
private void |
convertToWav()
Convert RAW output to WAV file. |
boolean |
isEnabled()
Returns true if this instance of SN76496 is enabled and
false otherwise. |
void |
output()
Convert PSG settings to Java Sound. |
void |
reset()
Reset SN76496 to Default Values. |
void |
setChannelEnabled(int channel)
Toggle a particular channel On/Off. |
void |
setEnabled()
Toggle SN76496 On/Off. |
void |
setFPS(int v)
Set current FPS Rate. |
void |
setRecord()
Toggle sound recording to WAV file. |
private void |
startRecording()
Start sound recording to WAV file. |
void |
startSound()
Start emulation. |
void |
stopRecording()
Stop sound recording to WAV file. |
void |
stopSound()
Stop emulation. |
void |
write(int value)
Program the PSG. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ToneGenerator chan0
private ToneGenerator chan1
private ToneGenerator chan2
private NoiseGenerator chan3
private ToneGenerator currentGenerator
private byte[] buffer
private java.io.FileWriter fileWriter
private javax.sound.sampled.AudioFormat audioFormat
private javax.sound.sampled.SourceDataLine line
private double clockSpeed
private int sampleRate
private int samplesPerFrame
private boolean enabled
private boolean recording
| Constructor Detail |
|---|
public SN76496(double c,
int s)
c - Clock Speed (Hz)s - Sample Rate (Hz)| Method Detail |
|---|
public void reset()
public boolean isEnabled()
true if this instance of SN76496 is enabled and
false otherwise.
true if enabled.public void setEnabled()
public void setChannelEnabled(int channel)
throws java.lang.IllegalArgumentException
channel - channel to toggle (0-3)
java.lang.IllegalArgumentException - if the value of channels is not 1, 2 or 3.public void setFPS(int v)
v - FPS Ratepublic void write(int value)
value - Value to write (0-0xFF)public void startSound()
public void stopSound()
public void output()
public void setRecord()
private void startRecording()
public void stopRecording()
private void convertToWav()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||