Klasse AudioDriverTeaVM

java.lang.Object
client.teavm.common.audio.AudioDriverTeaVM
Alle implementierten Schnittstellen:
Consumer<VIC>, SIDListener, AudioDriver, VideoDriver

public final class AudioDriverTeaVM extends Object implements AudioDriver, VideoDriver, SIDListener
Audio driver to be used in the JavaScript and web assembly version builds.
  • Felddetails

    • REGULAR_DELAY

      private static final short REGULAR_DELAY
      Siehe auch:
    • importedApi

      private final IImportedApi importedApi
    • lookupTable

      private final float[] lookupTable
    • mixer

      private final Mixer mixer
    • usb

      private final boolean usb
    • nthFrame

      private final int nthFrame
    • context

      private EventScheduler context
    • sampleBuffer

      private ByteBuffer 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: AudioDriver
      Open audio interface.
      Angegeben von:
      open in Schnittstelle AudioDriver
      Parameter:
      audioSection - audio configuration
      recordingFilename - name for a recording
      cpuClock - CPU clock
      context - event context
      Löst aus:
      IOException
      LineUnavailableException
      InterruptedException
    • write

      public void write() throws InterruptedException
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Write the complete contents of ByteBuffer to audio device.
      Angegeben von:
      write in Schnittstelle AudioDriver
      Löst aus:
      InterruptedException
    • close

      public void close()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Free the audio device. (Counterpart of open().)
      Angegeben von:
      close in Schnittstelle AudioDriver
    • buffer

      public ByteBuffer buffer()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Return 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:
      buffer in Schnittstelle AudioDriver
      Gibt zurück:
      The buffer to write audio to.
    • isRecording

      public boolean isRecording()
      Angegeben von:
      isRecording in Schnittstelle AudioDriver
      Gibt zurück:
      is this audio driver recording tunes?
    • accept

      public void accept(VIC vic)
      Beschreibung aus Schnittstelle kopiert: VideoDriver
      Propagates 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:
      accept in Schnittstelle Consumer<VIC>
      Angegeben von:
      accept in Schnittstelle VideoDriver
    • write

      public void write(int addr, byte data)
      Angegeben von:
      write in Schnittstelle SIDListener
    • clocksSinceLastAccess

      private int clocksSinceLastAccess(long now)
    • eventuallyDelay

      private long eventuallyDelay()