|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.javagear.ToneGenerator
public final class ToneGenerator
Texas SN76496 Tone Generator Emulation.
Field Summary | |
---|---|
private boolean |
amplitudeFlipFlop
Positive/Negative output. |
private double |
counter
Counter for square waves. |
private boolean |
enabled
Channel enabled. |
private int |
firstByte
First byte of frequency. |
private int |
frequency
Frequency of channel. |
private double |
psgCycles
PSG cycles per sample. |
private int |
volume
Volume of channel. |
Constructor Summary | |
---|---|
ToneGenerator(double clockSpeed,
int sampleRate)
ToneGenerator Constructor. |
Method Summary | |
---|---|
int |
getFirstByte()
Getter for property firstByte . |
int |
getFrequency()
Getter for property frequency . |
int |
getSample()
Return a single sample from Tone Generator. |
int |
getVolume()
Getter for property volume . |
void |
reset()
Reset Tone Generator to Default Values. |
void |
setEnabled()
Toggle Channel On/Off. |
void |
setFirstByte(int firstByte)
Setter for property firstByte . |
void |
setFreqSigf(int value)
Set significant bits of frequency. |
void |
setFrequency(int frequency)
Setter for property frequency . |
void |
setVolume(int volume)
Setter for property volume . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int volume
private int frequency
private int firstByte
private double counter
private boolean amplitudeFlipFlop
private double psgCycles
private boolean enabled
Constructor Detail |
---|
public ToneGenerator(double clockSpeed, int sampleRate)
clockSpeed
- clock speed (Hz)sampleRate
- sample rate (Hz)Method Detail |
---|
public void reset()
public void setEnabled()
public void setFreqSigf(int value)
value
- high byte.public int getSample()
public int getVolume()
volume
. The channel's volume.
volume
. The channel's volume.public void setVolume(int volume)
volume
. The channel's volume.
volume
- New value of property volume
. The channel's volume.public int getFrequency()
frequency
. The channel's frequency.
frequency
. The channel's frequency.public void setFrequency(int frequency)
frequency
. The channel's frequency.
frequency
- New value of property frequency
. The channel's frequency.public int getFirstByte()
firstByte
. First byte of frequency.
firstByte
. First byte of frequency.public void setFirstByte(int firstByte)
firstByte
. First byte of frequency.
firstByte
- New value of property firstByte
. First byte of frequency.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |