public class SIDMixer extends Object implements Mixer
Modifier and Type | Field and Description |
---|---|
protected IConfig |
config
Configuration
|
protected EventScheduler |
context
System event context.
|
protected CPUClock |
cpuClock
CPU clock.
|
protected List<ReSIDBase> |
sids
SIDs to mix their sound output.
|
MAX_FAST_FORWARD
Constructor and Description |
---|
SIDMixer(EventScheduler context,
IConfig config,
CPUClock cpuClock) |
Modifier and Type | Method and Description |
---|---|
void |
add(int sidNum,
ReSIDBase sid)
Add a SID to the mix.
|
void |
fadeIn(double fadeIn)
Fade-in start time reached, audio volume should be increased to the max.
|
void |
fadeOut(double fadeOut)
Fade-out start time reached, audio volume should be lowered to zero.
|
void |
fastForward()
Doubles speed factor.
|
int |
getFastForwardBitMask() |
boolean |
isFastForward() |
void |
normalSpeed()
Use normal speed factor.
|
void |
remove(ReSIDBase sid)
Remove SID from the mix.
|
void |
setAudioDriver(AudioDriver audioDriver)
Set audio driver for mixing
|
void |
setBalance(int sidNum,
float balance)
Set left/right speaker balance for each SID.
|
void |
setDelay(int sidNum,
int delay)
Delay feature: Delaying SID chip sound samples by time in milliseconds
|
void |
setVolume(int sidNum,
float volumeInDB)
Volume of the SID chip.
|
void |
start()
Starts mixing the outputs of several SIDs.
|
protected final EventScheduler context
protected final IConfig config
protected final CPUClock cpuClock
public SIDMixer(EventScheduler context, IConfig config, CPUClock cpuClock)
public void setAudioDriver(AudioDriver audioDriver)
Mixer
setAudioDriver
in interface Mixer
public void start()
public void fadeIn(double fadeIn)
public void fadeOut(double fadeOut)
public void add(int sidNum, ReSIDBase sid)
sidNum
- SID chip numbersid
- SID to addpublic void remove(ReSIDBase sid)
sid
- SID to removepublic void setVolume(int sidNum, float volumeInDB)
public void setBalance(int sidNum, float balance)
setBalance
in interface Mixer
sidNum
- SID chip numberbalance
- balance 0(left speaker)..0.5(centered)..1(right speaker)public void setDelay(int sidNum, int delay)
public void fastForward()
fastForward
in interface Mixer
public void normalSpeed()
normalSpeed
in interface Mixer
public boolean isFastForward()
isFastForward
in interface Mixer
public int getFastForwardBitMask()
getFastForwardBitMask
in interface Mixer
Copyright © 2018 Ken Händel. All rights reserved.