Package client.teavm.common.audio
Klasse AudioDriverTeaVM
java.lang.Object
client.teavm.common.audio.AudioDriverTeaVM
- Alle implementierten Schnittstellen:
Consumer<VIC>,SIDListener,AudioDriver,VideoDriver
Audio driver to be used in the JavaScript and web assembly version builds.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate EventSchedulerprivate intprivate final IImportedApiprivate longprivate final float[]private final Mixerprivate intprivate final intprivate static final shortprivate ByteBufferprivate final boolean -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungAudioDriverTeaVM(IImportedApi importedApi, float[] lookupTable, Mixer mixer, boolean usb, int nthFrame) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidPropagates VIC pixel data for video drivers.
Pixels can be accessed using vic.getPALEmulation().getPixels() Note: Pixel format is ARGB and is updated frequently at a rate of screen refresh rate.buffer()Return the bytebuffer intended to hold the audio data.private intclocksSinceLastAccess(long now) voidclose()Free the audio device.private longbooleanvoidopen(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) Open audio interface.voidwrite()Write the complete contents of ByteBuffer to audio device.voidwrite(int addr, byte data) Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden sidplay.audio.AudioDriver
getExtension, lookup, pause
-
Felddetails
-
REGULAR_DELAY
private static final short REGULAR_DELAY- Siehe auch:
-
importedApi
-
lookupTable
private final float[] lookupTable -
mixer
-
usb
private final boolean usb -
nthFrame
private final int nthFrame -
context
-
sampleBuffer
-
n
private int n -
fastForwardVICFrames
private int fastForwardVICFrames -
lastSIDWriteTime
private long lastSIDWriteTime
-
-
Konstruktordetails
-
AudioDriverTeaVM
public AudioDriverTeaVM(IImportedApi importedApi, float[] lookupTable, Mixer mixer, boolean usb, int nthFrame)
-
-
Methodendetails
-
open
public void open(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) throws IOException, LineUnavailableException, InterruptedException Beschreibung aus Schnittstelle kopiert:AudioDriverOpen audio interface.- Angegeben von:
openin SchnittstelleAudioDriver- Parameter:
audioSection- audio configurationrecordingFilename- name for a recordingcpuClock- CPU clockcontext- event context- Löst aus:
IOExceptionLineUnavailableExceptionInterruptedException
-
write
Beschreibung aus Schnittstelle kopiert:AudioDriverWrite the complete contents of ByteBuffer to audio device.- Angegeben von:
writein SchnittstelleAudioDriver- Löst aus:
InterruptedException
-
close
public void close()Beschreibung aus Schnittstelle kopiert:AudioDriverFree the audio device. (Counterpart of open().)- Angegeben von:
closein SchnittstelleAudioDriver
-
buffer
Beschreibung aus Schnittstelle kopiert:AudioDriverReturn the bytebuffer intended to hold the audio data. The audio data is in interleaved format and has as many channels as given by the result of open(). Use putShort() to write 16-bit values. Don't call write() until you have filled the entire buffer with audio.- Angegeben von:
bufferin SchnittstelleAudioDriver- Gibt zurück:
- The buffer to write audio to.
-
isRecording
public boolean isRecording()- Angegeben von:
isRecordingin SchnittstelleAudioDriver- Gibt zurück:
- is this audio driver recording tunes?
-
accept
Beschreibung aus Schnittstelle kopiert:VideoDriverPropagates VIC pixel data for video drivers.
Pixels can be accessed using vic.getPALEmulation().getPixels() Note: Pixel format is ARGB and is updated frequently at a rate of screen refresh rate.CPUClock.getScreenRefresh()- Angegeben von:
acceptin SchnittstelleConsumer<VIC>- Angegeben von:
acceptin SchnittstelleVideoDriver
-
write
public void write(int addr, byte data) - Angegeben von:
writein SchnittstelleSIDListener
-
clocksSinceLastAccess
private int clocksSinceLastAccess(long now) -
eventuallyDelay
private long eventuallyDelay()
-