public class ProxyDriver extends Object implements VideoDriver
Constructor and Description |
---|
ProxyDriver(AudioDriver driver1,
AudioDriver driver2)
Create a proxy driver
|
Modifier and Type | Method and Description |
---|---|
void |
accept(int[] bgraData)
Propagates VIC pixel data for video drivers.
|
ByteBuffer |
buffer()
Return the bytebuffer intended to hold the audio data.
|
void |
close()
Free the audio device.
|
AudioDriver |
getDriverOne() |
AudioDriver |
getDriverTwo() |
void |
open(AudioConfig cfg,
String recordingFilename,
CPUClock cpuClock)
Open audio interface.
|
void |
pause()
Temporarily cease audio production, for instance if user paused the
application.
|
void |
write()
Write the complete contents of ByteBuffer to audio device.
|
public ProxyDriver(AudioDriver driver1, AudioDriver driver2)
driver1
- sound driver, that buffer gets filleddriver2
- sound driver, that gets the copied sample bufferpublic void open(AudioConfig cfg, String recordingFilename, CPUClock cpuClock) throws IOException, LineUnavailableException
AudioDriver
open
in interface AudioDriver
cfg
- Configuration requested.recordingFilename
- name for a recordingIOException
LineUnavailableException
public void pause()
AudioDriver
pause
in interface AudioDriver
public void write() throws InterruptedException
AudioDriver
write
in interface AudioDriver
InterruptedException
public void accept(int[] bgraData)
VideoDriver
CPUClock.getScreenRefresh()
accept
in interface Consumer<int[]>
accept
in interface VideoDriver
public void close()
AudioDriver
close
in interface AudioDriver
public ByteBuffer buffer()
AudioDriver
buffer
in interface AudioDriver
public AudioDriver getDriverOne()
public AudioDriver getDriverTwo()
Copyright © 2018 Ken Händel. All rights reserved.