Package sidplay.audio

Klasse ThrottlingDriver

java.lang.Object
sidplay.audio.ThrottlingDriver
Alle implementierten Schnittstellen:
AudioDriver

public class ThrottlingDriver extends Object implements AudioDriver
No sound output at all, but sleeps regularly to slow down audio/video production.
Autor:
ken
  • Felddetails

    • THROTTLING_DRIVER

      private static final Logger THROTTLING_DRIVER
    • cpuClock

      private CPUClock cpuClock
    • context

      private EventScheduler context
    • startTime

      private long startTime
      Real-time since recording started
    • time

      private long time
      Real-time since recording started
    • startC64Time

      private long startC64Time
      C64 emulation time (emulation runs much faster than real-time)
    • c64Time

      private long c64Time
      C64 emulation time (emulation runs much faster than real-time)
    • clientTime

      private volatile Long clientTime
      Current time of a video player client
    • bufferedEnd

      private volatile Long bufferedEnd
      Current buffered end of a video player client
    • sampleBuffer

      private ByteBuffer sampleBuffer
  • Konstruktordetails

    • ThrottlingDriver

      public ThrottlingDriver()
  • 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 - error open audio device
      LineUnavailableException - audio device not available
      InterruptedException
    • write

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

      public void setClientTime(Long clientTime, Long bufferedEnd)
    • 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?
    • millisToDate

      private String millisToDate(Long millis)